Hello 🙂 I found a strange shadows behaviour and looks like a bug where shadows doesn't touch objects. Simple test scene, one MeshInstance3D as a flat box ground, the second one just a regular MeshInstance3D box. Add a DirectonalLight as a Sun on some f.e. 45-degree angle to make shadows. Move slowly up and down the box and watch the shadow. You will notice that the shadow is misplaced. Even if the box is partially under the ground the shadow doesn't touch the corner. This is strange. Now make this box small like 0.1, 1, 0.1 and the problem will be even more noticeable. On this image this box is partially under the ground but looks like hanging because of this bug. Different camera angle With using environment there is no difference, you can see these gaps and additionally you can see how strange shape this shadow also has. This box is also half way in the ground but doesn't look this way because of this stragne shadow. And the highest Godot possible visual settings with everything maxed out...
This is a very common technical issue that all non-raytracing shadow casting implementions(in all engines) have. Typically solved by having 2 shadow implementations, 1 the generic kind of shadow that produces this, and then another for what is known as 'contact shadows'.
This is not a bug, just a limitation of shadow mapping. There is an option call bias and normal bias, which you can adjust to see if you can fix it. It depends on your scene whether those options will help.