This is typically resolved by using an additional shadow caster object that is otherwise completely invisible except for the shadow it casts. You can do this by duplicating your mesh you want to cast shadow then in the inspector scroll down to the geometry instance section, un-collapse the geometry subheader and find the cast_shadow property. Check it's dropdown list to find a shadows only option there.
Next for extra optimization you can now disable the shadow casting on the original mesh instance since the duplicate already casts it. And to make it easier to work with you can parent them so the shadow caster is child of the other mesh.
Also going to leave here another remark as an aside. In your .gif the shadow is coming from the shaded side only, which of course makes sense, but if you did want this effect but for all the mesh faces to cast the shadow you would use the double sided option from the same property list mentioned above.