In general, getting the correct bone orientations for the UE mannequin out of blender is…not easy to do.
There are a few plugins that can help:
https://forums.unrealengine.com/comm…nreal-engine-4
I highly recommend looking into them if you need to export UE Mannequin from Blender.
Sounds like someday Epic might release their own Blender add-on to export Blender to Unreal tools, Part 1 | Live from HQ | Inside Unreal - YouTube