Block rotation of a body part of an animated character

The character patrols between points. I’m getting the angles to reach each point from the NavMesh.CalculatePath function. The movement of the character is controlled by animation (I checked the Apply Root Motion). When the character reaches one point (I check if the distance to it is less than 0.1 meters), I turn to the next point and the character runs there, and so on.

The problem is that the “run” animation rotates the spine to the left and to the right:
7588045--940879--left-right.png

As a result, it rotates too wide at the corners:

7588045--940882--T6SPO7UlEv.gif

I used transform.rotation = lookAtCorner in the LateUpdate() function, the spin was blocked, but all the child objects were still spinning.

Are there other ways to make the character move in a straight line, or make it look better?

Please, help! This animation looks weird!