Clipping through corners when walking backwards in raycasting

Whenever I walk backwards into corners or walls at certain angles I clip through the wall and out of bounds. What do I do?

It works when you walk in any direction. The raycasting extension is kinda buggy. you just need to implement a check to see if the player is in a wall and push them back out to the nearest non-wall block

Thanks so much! I’ll try that.