How to set up player movement in the Unity engine where the speed is set by a script and animation root motion is not applied, but synchronize the two in order to avoid issues such as foot sliding.
In animation blend trees, root motion isn't linearly blended. Blending halfway towards a forward movement animation will not result in a root motion with half that animation's speed.
This likely has to do with things like foot phase synchronization. More info on this is available at https://kybernetik.com.au/animancer/docs/manual/blending/mixers/synchronization/.
The key aspect to work around non-linear root motion blending is to not blend root motion at all. Instead, we can manipulate the speed of animations with known root motion velocity in order to match in-game player velocity.
We still use a blend tree to simplify transitioning between different movement animations, even though we aim to always end up with a single active animation.
Here's the step by step approach:
This is what the resulting blend tree looks like:

It may be possible to still blend between movement and other animations by nesting blend trees, although copy pasting a blend tree you previously created requires a simple workaround.