ApplyOverrides gets rid of root motion in the clips

So I’m creating a dynamic animation system where I swap different animations based on equipped weapons, while the animation states are all the same (so I won’t have to create a mess of a spaghetti inside the animator state editor for each possible weapon combination in my game).
Everything was pretty good until I decided to incorporate root motion into attack animations. The problem is, that after applying an override through script (using AnimatorOverrideController’s ApplyOverrides function) the root motion ceases to exist. The .hasRootMotion method returns false, while it returns true if I don’t override everything.
Is this by design, or is it a bug?

Apparently .hasRootMotion returned false because I didn’t apply an Avatar in script, after that it does return true, but the animator’s deltaPosition shows all 0s when overriding and it shows the right vector data when not.

Disregard that, once again I’m doing something wrong, as I tried to reproduce the issue with a blank project from scratch and overriding animations doesn’t remove root motion now.

Unless it’s a problem with Addressables.

Addressables had noting to do with that. The problem was with me EXCLUDING the root motion bone from avatar mask for both layers I used in the animator. That was very silly of me. Once again I’m lashing out on Unity when it was entirely my fault. My only excuse is that I defined animation layers and masks so long ago and tried to add root motion only just recently, so I forgot how my convoluted system works.