I don’t think they are allies as much as they have shared interests. China wants its historic lands back and it knows that Russia cannot forever hold onto those lands in the midst of its decline, so it’s playing a waiting game.
I think that Xi wants to help Putin (into the Poor House, or into the morgue) - and then "clean up" when the remaining spoils are to be divided.
Xi is like that "friend" you had in high school who would egg you on to "Go ahead and cuss out the Principal!" or "Ask the head cheerleader out on a date!"
Afterwards, they can scavenge the remains.
Regards,