Yours is the optimistic view. China is declining. Both countries are run by increasingly desperate and brittle autocracies. I don't believe China is withholding weapons from Russia because it fears Western sanctions. Rather, it's smarter than Russia in understanding that "the threat is mightier than the sword". We now know the full extent of what Russia is capable of--not much. I've always said Ukraine was like a chess game. Putin made a few blunders and we're just waiting for him to be checkmated even though he should have resigned long ago.
China has so far no blundered. But it's position on the board is not good so I worry.