China also has its own, serious internal problems. A good shooting war could be a beneficial distraction for their people, as well.
They don’t have enough people to fight us in a war. Nor do they have the domestic energy supply. They import 85% of their energy supply, the vast majority of that from the Persian Gulf. The rest the mostly get from Russia via pipelines coming out of Siberia (and how long would it take for a Tomahawk to disrupt that?). If we used our Navy to stop oil shipments to China (just announcing we’d sink any tanker entering the South or East China Sea would be enough to stop virtually all such traffic) the lights go out in China in about a month or two, and within 6 months they’re in major famine mode.
China would lose 500k-1mil men just crossing the Taiwan Straight to invade Taiwan. Xi is fine with that. But they would lose exponentially more crossing the Pacific to reach our left coast. Assuming they have troop transports that can make that crossing to begin with. If they try to fly them over our Navy and Air Force will obliterate them in the air. The ones that somehow make it through would have to try to survive not only our domestic based military but all the rednecks with hunting rifles and gun nuts with AR-15s. If they seriously tried they wouldn’t have a functional population left by the time they even got close to succeeding in occupying HI, CA, OR and WA. And that’s if we don’t retaliate by cutting off their oil imports.
That all ignores that China will have half its peak population by 2050 even if they aren’t stupid enough to try to invade us. That’s simple demographics. Their 1 child policy was too effective.