If we take the laws of war from the two world wars, any nation hosting troops from a belligerent nation will either have to expel these troops or they become party to the war. An attack on SK is completely legal if they continue providing a safe harbour for Americans.If the South Koreans don't comply, and the PLA attacks South Korea pre-emptively as a result, how could this be legally and morally justified? Surely, there's no reason for China to fight South Korea if they are not prepared to initiate hostilities.
This practice has simply been forgotten because western countries often participate in wars indirectly by hosting troops of a country which is involved in war, but the host nation is too powerful to make it worth attacking them. The Ukraine war is the best example. But of course China isn't Russia and if you're already in a world war with the US, the marginal danger of involving minor powers like the Philippines or South Korea are smaller