How to keep pawn not to pass through the walls?

I recreated my project from scratch and got the same result
I just want to move my cube like you did.

This is my Pawn:

This is how it moves:

And this is a wall: