For your argument to be valid, first you need to prove the actual detention of uyghurs by China which things stand as of now is nothing but a triade of accusation by western propoganda.
China has not threatened other muslim countries nor have they attacked any, Russia on the other hand have had muslim blood on their hands in multiple theatres, Pakistan was the one who broke up the Soviet Union so please dont wiegh Pakistan and Iran on the same scales.
Pakistan has open cordial relations with tons of countries that are extremely Anti China, our security paradigm and threat perception is completely independent of the Chinese, even suggesting any complicity there is false and ill advised.
Pakistan leaning towards China is influenced by
1. Common enemy India
2. Massive economic investments in Pakistan,
which in the end game make the Chinese more dependant on Pakistan rather than the other way around as CPEC in contrast to BRI is not just an economic initiative but a matter of life and death for the Chinese and is an initiative to provide a route for thier oil and other trade to avoid bieng held hostage the US navy.
The relations between China and Pakistan are of mutual respect and we have given them loads of sensitive tech in the past including acess to western fighters(f 16's), cruise missles(tommahawk), stealth(crashed SEAL chopper) and training their airforce on western tactics. This is value that no amount of money could buy for the Chinese and they know it very well.
And to top it all, we have never helped China against a fellow muslim country unlike what Iran is now doing.