Retargeting UE5 Issues IK Rig

Following this video my root motion works correctly but with another issue…

This is the animation with a working root motion:

but if I enabled the “Force root lock” option, there is a movement between first frame and last frame:

First frame:

Last frame:

Any idea to fix this problem?

Thank you.