War with China would be ruinous.
For China.
They're already facing demographic collapse after multiple decades of the one child policy with no sign of recovery since raising a single child is ruinously expensive let alone the new limit of three, India would instantly got hot on their water war for the headwaters of China's three major rivers and destroy Chinese water infrastructure, their economy is a joke and made up of tofu dregs, their military has just been outed as incredibly corrupt to the point that no one is properly trained and their strategic weapons are full of water instead of fuel, and they've got the biggest infrastructural strategic target in the world in the Three Gorges Dam. The destruction of that last one would likely result in millions of deaths from the deluge and wipe out power for a significant chunk of what doesn't get washed into the ocean.
Even if China won, if any significant amount of casualties were inflicted they'd lose in the end.
A conventional war between China and the US is very much not in China's favor. And they should be smart enough to realize that.
And that's with the recruiting problems the USA is having.