Given the deep ties between US and Japanese government, it would actually be impossible for Japan to break off that alliance. The most it can do is to tell US that it will not participate in a Taiwan scenario, but US forces would still be operating from Okinawa and such.
The Japanese government allowing US forces to operate from Okinawa and other Japanese bases is regarded as a declaration of war against China. Neutrality would be the Japanese government interning all US troops
And seriously, if US bases in Okinawa and elsewhere in Japan are launching attack planes against China, then China will respond in kind.
Then what does the Japanese government do?
Actions by the Japanese military against the Chinese military are a declaration of war.
And if Japan stands aside, then Chinese military forces will successfully attack and destroy US military forces located on Japanese territory, whilst Japan looks on. That is Japan effectively choosing China and the end of the US-Japan alliance
Overall, US deep state is not operating rationale at the moment. A major loss to China around westpac would mean it will loss its power in Asia Pacific region completely and probably loose its hold on much of the world. Even its NATO allies in Europe would bolt if they see that America cannot defend them in a multi-polar world against China/Russia. Since the outcome of this is such a disaster for America's future. If America does join a conflict, this will be a long drawn out affair unless things get so bad in America (due to losing East Asia products/supply chain) that people take to street for ending the war.
So again, #1 lesson for China to learn here is that it needs to be prepared for a long, drawn out conflict.
It's not just the deep state which is irrational. This extends to Congress and the Senate as well, where anti-China actions are really popular, no matter if they are irrational. And if anything, this will only get worse over the next 5 years.
On Europe, realistically Russia could only take the small Baltic countries and maybe Finland.
And given the Russian experience in Ukraine, there's no way Russia could even get past Poland.
So at least 90% of the European Union would still be intact and their militaries would be fighting the Russians in Poland.
Even this smaller EU has 3x the population and 5x the GDP of Russia, so we know how this war would end.
The conclusion is that Russia isn't actually a real threat to Europe.
---
And yes, if the US lost in the Western Pacific, the future of NATO looks very doubtful.
As for a long-drawn out war, I've previously mused that a US-China war might look like the 20 year period covering the French Revolutionary Wars which then transformed into the Napoleonic Wars. But it is useful to point out some of the key elements:
1. China is the equivalent of a unified Continental Europe which faces no realistic challengers on land
2. Russia is friendly to China instead of hostile to the French Republic/Empire
3. The French lost and at the end, the victors re-established the French monarchy and put a king in charge of France