China is all aggressive because they know it's now or never. Even before the bad news with their economy it was already a foregone conclusion beforehand.
Everyone knew their population would decline. Then their comparative advantage disappears. Their advantage is a shitload of people, even with a lower GDP per capita it's still significant as it's 4x the population as the next country (besides India, who are on an even lower GDP per capita right now)
Due to the sheer numbers they can use their internal market as political leverage. Disagree with them and no money for you.
There's a few skirmishes but I think Putin has made Xi think twice. Although I do believe China can sustain quite a bit of losses if they do go to war before their advantage of many people disappears.
Firstly they have excess males so theoretically even if they lose excess soldiers it wouldn't affect their birth rate as the issue is lack of women not men.
Might be a two eggs in one basket outlook for them, gain a bit of territory and rebalance their gender ratio.
We can only hope Putin's war has made Xi think twice whilst we bide our time whilst their population decreases.