China has no fear of a united Korea. In fact, it is in their interest that this happen since it will increase the business they do with both.
China’s overriding concern here is starving refugees which is why the troops were moved into position to block them.
“China has no fear of a united Korea.”
...as long as it is their unified Korea - a communist dictatorship and Chinese vassal.
A pro-US unified Korea with domestic political freedom would be a terrible example that could inspire their own population to get all uppity, and aspire to freedom themselves.
Also, North and South Korea have the fourth and fifth biggest Armies on Earth - a non-trivial force sharing a long border with them.
China has had an aggressive program of trying to lock up natural resource supplies - it relies on North Korean supplies of several mined commodities, like iron tungsten and coal. North Korea also has large deposits of rare earth metals, for which the Chinese went to great lengths to lock up the market.
Also, China has made a lot of diplomatic hay doing a Good Cop/Bad Cop routine, with North Korea playing the crazy attack dog for them. They would hate to lose that leverage.
If the files got out about what China actually did and does in North Korea (like proliferating nukes to and through N. Korea), they would be liable for sweeping sanctions.
North Korea is Communist China’s single closest and most reliable ally - arguably its only such ally in the world.