I have written an article on why China doesn't yet have the capability to take Taiwan, but they certainly would like to. It would take a decade of ship construction, something we would see and know about, to build the landing ship fleet to even pull it off- and right now China is working on its carrier designs and escort ships to become a true blue water Navy not a coastal one. So they can't do it now.
But imagine if there was no Ukraine war and China did have this capability- do you think the sanctions response would be that high? China has spent the last decade underwriting ports and infrastructure all over the world and has half the developing world potentially owing them money. China has leverage, something Russia didn't have(but thought they had with gas to Europe).
While the massive trade to US and EU makes such actions less likely, should these two go heavy on sanctions they would also find it in the short term impossible to replace those supply chains and there are plenty of factories in China that could be nationalized- meaning some western capitalists would be trying to play peacemaker.
But the Ukraine war did happen and if it had been over quickly, China's thesis for Taiwan would have remained. But it has been prolonged, exposed military weakness in Russia, and has the world in solidarity with Ukraine. It has got the west and other countries patting themselves on the back for sanctions and being united and empowered. If China tried something now, thanks to the Ukraine war, he would find a swift and strong response. Russia has actually caused China harm in limiting its options. I think it is quite likely China is peeved with Russia over that.