I have another shade problem in Eevee which I couldn't find a solution or reference: when I put some vertical plane on a horizontal one (or extend the horizontal to add a vertical one) and light them, there is always a line of light between the vertical and horizontal and sometimes it is very wide even if you make sure that the vertical touches (or exceeds down) the horizontal plane.
It looks like you're using Eevee (maybe clarify this in the question). There are two ways which you most likely have to combine to get "contact shadows".
- Go to the Object Data Properties of the light source which is shining on the object and enable Contact Shadows. Maybe this still doesn't look correct, try changing the Distance value for example and experiment with the values generally.
- In the Render Properties you'll find settings for Shadows, mostly for the quality and resolution so changing the values might result in slower performance. If you increase the Cascade Size from its default 1024 px to 4096 px it will make the shadow look better, but on each end of the wall you can still notice there's no real contact shadow.
In the end it's maybe best to combine both settings to get the best looking result with the least performance loss.