Kim would immediately invade S.Korea the moment Taiwan AR happened. He eagerly awaits this opportunity. I would probably say that Kim is even more eager than Xi himself for AR to happen because that would allow him to go on to take SK with full Chinese support.
If China is winning, then is there any need for North Korea to restart a Korean war? In the aftermath of a Chinese win, the US position in South Korea is fatally undermined, at no cost or risk to North Korea.
But if China is losing, then North Korea faces the prospect of losing its economic lifeline, and knows it will be next.
From China's perspective, a ground war in the Korean peninsula plays to China's strengths. The worse case scenario is a grinding war of attrition and a stalemate.
The best case scenario is the Chinese Army conquering South Korea and marching thousands of US soldiers into POW camps.
The more that South Korea supports the USA, the more likely it is that there is a Korean peninsula ground war, which both the US and South Korea don't want.
EDIT
Come to think of it, North Korea could get away with limited, sporadic attacks because the US/SK really don't want to get into a ground war with NK and China.