Your light is already hitting the edge of the cube, so the issue is barely visible:
The fog inside the blue rectangle shouldn’t be illuminated, because it’s in the shadow of the cube.
Try to recreate my second example, one spotlight, one wall mesh, exponential height fog → volumetric fog, nothing else. if you shine the light directly at the wall, the cone of light will be visible behind that wall, as if passing straight through:

The red square should be completely black, because the wall should block the light.
