Exponential height fog and changing time of day

Hi,

Im currently working on an outdoor environment which is mainly lit by a directional light acting as the sun, a skylight and has exponential height fog.

To avoid the main directional light affecting lighting while it moves under the terrain, I have made it fade out to an intensity of 0 before it moves underneath the terrain. The problem im having is that when the intensity of the directional light hits 0, the height fog im using has a sudden change of brightness.

Example here - https://i.gyazo.com/360f18071b9e9b852bd92066ec3ccab8.mp4

Im not sure how to avoid this and get a smooth fade of the fog as the light fades. I have tried keeping the directional light at an extremely low intensity (0.000001) but it still has effects on the fog/lighting while under the terrain.

Thanks.