C++ how upperbody montage rotate with lowerbody?

Hi, everybody! I now have two animations, one is combat-to-idle(ie. Retract the sword), another one is run. Role body will lean forward when be run animation, and stand upright when be combat-to-idle animation. So, problem is upperbody is straight up with lower body lean forward when role out of battle keep running. How to solve this? If anyone can help, thanks a lot!