Force push the player through a wall

The force of the boss push the player through a wall. How can I avoid this?