Root motion in UE5 absolutely does not work (in the montage animation)

None of that stuff worked but I found a solution using blender. In UE5 right click on the original animation. Go to asset actions and click export. then go to blender and open it up as .fbx
After that click on the skeleton. Go into pose mode. And then click on the root and delete the animations. If that doesn’t work go back to the starting frame, and click on the pelvis. do " shift s" and cursor to selection. go to the next frame and do “shift s” again this time, selection to cursor. do this for all the frames until it looks good.
After that export as .fbx
under the armature settings untick the add leaf bones. under animation untick NLA stips and All actions. then click export. Finally, you can import to UE5 like normal