Mecanim CrossFade: CenterOfMass issue

you can see it is not happening with the same animation replay
but happens when another animation is started

animation settings
Root Transform Rotation - body orientation
Root Transform Position (y) - feet
Root Transform Position (x,z) - center of mass

5.67
5061269--497273--comproblem5.gif
2018.4
5061269--497276--comproblem5_2018.gif

might be related to this?
Turns out Animator.CrossFade (the method used to make smooth transitions between animations) always starts its blending at the beginning of the first animation. I tried every possible method and work around, but its no use. As soon as the method is triggered the first animation automatically goes to the first frame.

or somehow
mecanim doesn’t update center of mass correctly at transitions when it has some velocity?

okay, made a barebones test
and it looks very much like

this happens with blend trees (and not with simple states)

to reproduce:
5064317--497711--anim1.jpg
if blendtree (for both)
5064317--497714--anim1b.jpg

and the script

    public Animator animator;
    public string anim1 = "anim1";
    public string anim2 = "anim2";

    public KeyCode switchAnim = KeyCode.Space;
    public string lastAnim = "anim1";

    public bool isBlendTree;
    public float randomx;


    void Update () {

        if (Input.GetKeyDown (switchAnim)) {

            if (isBlendTree) randomx = Random.Range (0, 1);
            if (isBlendTree) animator.SetFloat ("Blend", randomx);

            if (lastAnim == anim1) {
               
                animator.CrossFade (anim2, 0.1f);
                lastAnim = anim2;
            } else {
                animator.CrossFade (anim1, 0.1f);
                lastAnim = anim1;
            }
        }
    }

unfortunately this is not just the issue with CrossFade, but with transitions type of animator.SetTrigger too
tried simple states with substate machine and the problem still occurs

the only circumstance where this problem is not there, is if all animations are on the base layer

@Mecanim-Dev
could you please take a look at this issue

looks like animator.bodyPosition / center-of-mass is calculated wrong (frequently) when animation transitions to different animator level (blend-tree / substate machine)