the same way Russia invading Ukraine did.
See, that's why there's still some worry that China might do it anyway despite what a bad idea it'd be. Everyone was remarking that "no way would Russia be dumb enough to invade Ukraine" and then it happened.
There's hope that having seen what a dumb idea it was might discourage the PRC from trying the same thing, but there's still the twin considerations of "if Russia looks like it's actually getting away with laughing at another nations' sovereignty in any meaningful way it'll encourage more of this shit" combined with "the sheer magnitude of human stupidity is both universal and boundless"
I always found the idea that Russia wouldn't dare invade laughable. Putin had invaded 5(?) countries over his career. The idea that he wouldn't dare invade Ukraine
yet again always seemed baseless to me.
Putin's desired legacy has been made clear throughout the decades: The revival of the Soviet Union via the physical growth of Russia as it gobbles up the old soviet satellite states.
As he is now dying he is willing to risk anything that wouldn't pose an existential threat to Russia to achieve or even just inch closer to this goal.
Cause unlike Xi when he dies he's probably going to be replaced with some normal dictator that won't care about reviving the Soviet Union at all, so he knows his time is limited.
But China isn't Russia, and Xi isn't Putin.
Xi is content to go slow. He has his legacy: The glorious Chinese republic and their economic, political, and cultural growth over his reign.
If he goes to war he risks this, no matter the fact that there is no true military risk the Wests reaction could set Chinese economic and global political power back by more then a decade.
And when he dies? Someone with similar goals will take over and attempt continue the growth of China.
If west's reaction to Putin's invasion had been lukewarm then Xi might have went for it, but even a 25% chance of the same economic sanctions happening to Russia is far too big a risk to take for just Taiwain.
---
China is talking a big game now, but they lie constantly about everything (exactly like Russia) because they know words are cheap and pointless.
Them generically saber rattling is about as meaningful as North Korea doing the same: AKA, not news.
If they said "We are gathering our forces and are going to invade Taiwain next week. Here is an official declaration of war" then sure, that's worth something, but vague threats are meaningless.