Engines aren't commodities, they are vulnerable to such eventualities only to a degree.You're not trying to save money here. These are for war. Why are they not ironing out vulnerabilities ASAP? Especially factors that are extremely susceptible to the whims of other countries?
China can service Al-31FNs. Ukraine flies on 40 yr old airframes and 30 yr old engines in combat, after being cut away for well over a decade. And that's the poorest country in Europe for you.
Engines don't turn off away in a moment. Not even in few moments.
Finally, no one said emergency replacement is impossible. It's undesirable, but there's option B always on the table. As of now, Lyulka engines are simply better fit for the task, for logistical and evidently some practical reasons.
And, even skipping on deep friendship between two countries, Russia is much more firmly anti western than China itself. China isn't even in a true cold war. Russia is amidst a hot one.