In fact you think it works in your second PG because by setting the density to 0 you make the fog disappear, but the fog code is still there whereas it should not.
As a workaround, you can set the checkReadyOnEveryCall
property of the mix material to true
to make it work: