How to Fix if Blender Rotation is Wrong on Import

So i exported a Rigify blender skeleton and it seems to work fine, the only issue is when I import into unreal, and then when in unreal go into the skeleton, I try to rotate a bone. The mannequin rotates the thigh forward and backwards with the Z axis when I change the local rotation. However, my skeleton rotates the same way but with the X. Is there a way for me to fix this?

Does it matter? If you export an animation from the same rig it should go through the same process.
if you retarget the rotation should be taken into account and fixed.

So long as you don’t have a rogue setting in your import I think you can safely ignore and try to import in custom animations.

However I should also note, the deform groups from rigify can be very problematic in their default mode when it comes to retargeting.
the most odd thing to note is the clavicle/shoulder/upper arm bones and the twist being inverted. (Twist is the shoulder, upper arm is the lower portion of the arm).

Okay, I was thinking it would be an issue if rotating out of the in ue4 animator as well but Guess not in terms of viewport rotation. Was also thinking it would be an issue for duplicating basic animation and take more time. Such as importing animation into blender and copying and pasting keyframes into another blender file, but I guess copying and pasting keyframes from one file to another is not possible according to a video I watched anyways.

If both files are open and if the skeletal structure matches (in blender) copy and paste of poses work just fine.
I use them all the time.
And learn to paste opposite too. It’s a great time saving tool.