Mmmmm...two minds about this whole "China invades, US supports" prediction.
On one hand, the rapidly slowing growth of China and inevitable financial crisis around the housing/construction bubble means that the CCP is rapidly losing its political legitimacy. To counteract this, Xi can run a campaign of "tighten your belts" if they choose to invade the DPRK. They could disable other factions and keep down political dissent, whilst installing a new government in Pyongyang.
However, does China really want to be the one to engage in decades of guerrilla warfare with troops and command that are insufficiently battle-hardened? It would be their Iraq, times one hundred. Even with the US & ROK guaranteeing air and sea superiority, they can do nothing to fully disable the domestic paramilitaries and special forces stationed all around the peninsula and mainland China. Secondly, this would spit in the face of China's image of soft projection. It could aggravate the situation in the South China Sea further, and cause huge dissent inside of Hong Kong. Taiwan could fall into political turmoil as well, perhaps electing a populist hawk that butts heads with China, slowing down trade and travel agreements.
Ultimately, this looks to be a "now listen here, Kim" move from Xi.