That was what I would have guessed, I'm just a bit confused why the Root Motion Joint isn't at the world origin (0,0,0) where RMJs normally are located, because in that case it would not cause this problem.
There are two easy ways to achieve what you want in Maya, but I'm not quite sure with both how well they will translate to Unreal.
The first one is to turn off "inherits Transfrom" in the Attribute Editor on the joint you are parenting to your RMJ before you parent it. This will cause the joints matrix to completely ignore the RMJ, so it also won't move when the RMJ is moved.
The second one is to offset the Parent Offset Matrix, this solution only works in maya 2020+, the offset parent Matrix options are located right under the "inhertit Transform" option in the Attribute editor. You can Simply take your RMJs translate values multiply them by -1 and put that value in the corresponding box in the composition Tab this will only work if the RMJ only has Translation, not with Rotation or Scale. This option will also allow you to move the entire rig by the RMJ if you wish to do so.
There is a method that is a bit more complex but I think the chances with this one to transfer correctly to unreal are better then the other two above. Offsetting animation. Once you have parented your rig to the new joint, you just offset back the entire animation curves on the joint right beneath your RMJ relative to the parents offset to world the origin.
Now it is important to note that this works pretty easily if the joint your RMJ only has Translations.
If that is the case I even have a script to do that. Just parent your Rig to your RMJ and select the Joint direclty under the RMJ and run this script from a python tab:
from maya import cmds
def offsetAnimationToParent():
sel = mc.ls(sl = True)
attributes = ["tx","ty","tz","rx","ry","rz"]
for s in sel:
parentObj = mc.listRelatives(sel, parent = True)[0]
anim_changes = []
for attr in attributes:
ac = cmds.listConnections("{0}.{1}".format(s,attr), s = True)[0]
if ac != None:
v = mc.getAttr('{0}.{1}'.format(parentObj, attr))
anim_changes.append([ac,v])
for crv in anim_changes:
cmds.keyframe(crv[0], edit=True, relative=True, vc=(crv[1]*(-1)))
offsetAnimationToParent()
If your RMJ also has Rotations and Scale on it that arent default, the math behind it will get a lot harder and you'd probably have to write a script that just matches positions to a dummy object with the same animation in the same local space without inherited Transforms at every keyframe.
I hope this helps!