Why does the shadow look weird only when my project is running?

My project is basically a demo of one of Brackey’s projects for beginners.
This is how the shadow normally looks like.

This is how the shadow changes while running the project.

Why is this happening? Is there any way to get rid of this?

There might be gap in between the wall and floor, if not, this can be an issue within the editor. Most of the time it will work itself out, but if the problem resides try going into the lighting window and bake the scene.