Animation Rigging my upper body to stand still

I have a character and I can control it and it has walking animations on it and I implemented animation rigging to it so that it can hold a gun.
But my problem is that my upper body sways left and right and leans forward and backward when I walk due to the walking animation. I don’t want that.
I want to keep my upper body still when holding my gun. How would I do this?
I tried to use ChainIK Constraint but I don’t think I’m either using it right, or not using the right constraint.

Any help is appreciated!

try putting a script on SpineConstraint that just runs in LateUpdate() and resets the transform on the desired spine Transform.
Or you have layered animations… one set for the legs, and another set for the upper body.