That's good from one point of view. And not good from another point of view. Where is Taiwan? It's just off the coast of China. And where is Ukraine. It's just next to Moscow, Russia. The Russians and China are well aware of that fact.
So does China come off the coast of the USA, or do the Russians come next door to the USA? Nope.
China and now Russia have reputations of defending their neighborhood. Which is something that was proven in the Korean war.
"China assisted North Korea during the Korean War (1950–53) against South Korean and UN forces on the Korean peninsula. Although China itself remained neutral, three million Chinese soldiers participated in the conflict as part of the People's Volunteer Army fighting alongside the Korean People's Army."
China–North Korea relations - Wikipedia