In case this doesn’t work, another solution is to use Autodesk FBX converter. This is free software from Autodesk. It corrects some of the issues that may arise from creating the armature from blender or user. I have tried many solutions and this one works for me. I would recommend doing this first before trying any other solution. No need to change any settings both in Blender and unreal engine.