how to stop player character world alignment changing by enemies pushing it?

I made a game with movements and camera akin to Little Nightmares, and I have enemies in my game that when they collide with my character or shoot it, it changes the direction my character faces by default, making the controls (W,A,S,D) work all wrong. I’d get attacked, and suddenly instead of W making me go forward, it’d shift to go in an angle. moreover, projectiles sometimes push my character super far to the point of pushing me out of platforms, when I dont want them to push me at all. is there something i need to tick for them to stop affecting my world transforms? this also happens if I walk and collide with physics objects by the way.
EDIT: this is also happening maybe because of my attack animations, which make the character move forward, but for some reason add a bit of a shift to the characters rotation, which stays throughout the whole game. how can I make the character attack while still moving forward using root motion, which keeping the rotation of the character uneffected by the animation?

Is your player physics simulated in any way? It sounds like it might be but probably shouldn’t be.