Yes, querty's suggestion of dynamically switching shadows on and off is the best way to avoid this problem. Have an entity action check it's z position compared to the camera, and only activate the shadow flag when the camera is higher than the entities' feet.