Root Motion Movement flips the X and Z axes

The character’s root is oriented with Y facing forward and Z facing up and down.

Move Z+ (skyward) and move forward in a character animation

When I run an animated montage in-game with Root Motion applied, the character will move in the X-axis direction and then move forward.

Just to be on the safe side, I animated the character to move along the X-axis (left and right), but when I ran the montage in-game, it moved back and forth along the Z-axis.

I created an animation using an animation sequence and wondered, what am I missing?