Animation error is not moving as I want it to

Now there is a problem like this: When creating the weapon animation, despite not touching the torso keyframe, it does not move like the normal walking and running animations; it moves in a straight line. It only happens when I pick up the weapon. You can find an example video below:

Video