My sprites are clipping into walls, HELP!

I am making a game where you navigate a maze and don’t get caught by an enemy, but when you are in a corner and press the buttons to keep going into the said corner and press another button, you clip into the wall and are sorta stuck there. It is very hard to explain. Here is my game.

Hey! I actually made a baldi game some time ago, and fell into the same issue. I haven’t found a way to fix it though (sorry).
I found something online for a better AI code for characters:

Just try to avoid actually getting stuck.

I think that is a bug with the tile maps my bother has used it to beat many hard games by