How do you use Shadowmask but still make static object cast shadow on Dynamic object?

From my understanding, if a directional light is using mixed lighting and Shadowmask mode, static objects will cast shadow and it will get baked into the lightmap.
The problem is, dynamic objects will still receive full direct light even if they are inside the shadowmasked area.
like in this picture for example


and this is with DistanceShadowmask mode (realtime shadow)

Is there a way to get the bottom result with Shadowmask mode? The cube is obviously a dynamic game object.

This page gives two resolutions but I’m already using adaptive probe volume in the scene
Mixed mode lighting - my baked objects are not casting shadows on RealTime objects – Unity

I want to use DistanceShadowmask but only in very near distance (<50m) this create problem where if I move too far, the shadow will fallback to baked shadow and dynamic objects around that area will ‘pop’ because they are suddenly affected by Directional light.