But do you really think the US won't defend South Korea from a possible North Korean attack or a Chinese attack on Japan?
Short answer no. They will do what they did to Ukraine (stay far and send weapons only).
Things would depend on the exact situation though. For example whether we are talking about a single conflict between North and South Korea or are we talking about a much bigger conflict among many countries including North and South Korean.
History suggests that US is not willing to directly participate in any "real" war with a "real" military. Last time they did that was Vietnam and that has left US regime with bad memories which they don't want repeated.
This is why proxy wars has been US foreign policy for many years.
The only time US gets involved in any direct conflict is if they either have no choice and enter the war as late as possible (eg. WWII) or if they have basically disarmed and destroyed the country they are about to invade (eg. Iraq, Syria, Libya, ...) and they do it with a coalition (not even alone!).
Another thing to consider is that wars these days with any of the countries US has not yet invaded is going to be very different because these countries (eg. North Korea) are capable of hitting US mainland so if US starts a war with any of these countries, it will not be fought in those countries' soil, it will also be fought inside US soil.
Another thing to consider is US economy. It is already too fragile and dependent on other countries like China (East Asia) or on energy prices (West Asia). Any war started in any of these regions would put a lot more stress on US economy and Americans aren't really known for endurance, United states may no longer be United (...country of Texas for example
...).
Japan is even more important to the US than Taiwan. Or do you really imagine South Korea and Japan switching sides toward China? Or who will stop North Korea from attacking South Korea or China from attacking Japan if the US is already shattered and broken?
Well, all these countries existed for centuries and some for thousands of years before US was "manufactured" and they had their own conflicts and they will exist and have conflicts long before US is "shattered" and disappeared.
Sides will change in major conflicts but it isn't really predictable. I don't see Japan changing sides any time soon though specially after Abe was assassinated, the independence dreams died with him (they'll remain a US playground).