How do I keep root motion intact while changing Rig to Humanoid?

I have an animation with root motion. Here is how it moves:

enter image description here

When I change the Rig from "Generic" to "Humanoid", it loses the root motion and instead walks in-place:

enter image description here

How do I keep the root motion intact while using the Humanoid Rig?

I have found out that I influence how the model is being moved by the animation by changing ""Root Transform Position", etc. but I wonder why I have to struggle with them at all. I have not been able to reproduce exactely this motion, so I wonder what is going on here and if it’s normal that users have to struggle so hard to simply keep the rotation motion as in the original Generic rig.