Your issue is you have different animation sizes or collision masks on these animations
And when you change animation part of your player is inside wall and is getting pushed out of it
Which for you looks like its going trough wall
Looking at image of your player which looks like vertical rectangle
other animations would need to be exactly same for it to work perfectly
Otherwise you get what you have
(In general ALL your images of all animations should be as big as biggest animation you have
It is possible to have different size images per animation but that is hell to manage)