The Chinese situation was fundamentally different from the Western European colonial empires. In fact it's rather more like Russia, who also managed to keep her Eurasian empire, or the United States, who acquire vast territories West of the Mississippi. In the case of China, those lands you refer to are mostly Sinkiang and Tibet.
Most notably there is the inherent advantages of a land link. It was (and is) considerably easier for a Chinese regime to dispatch an army to Sinkiang to suppress a revolt, than it is to ship a similarly sized force across the Atlantic Ocean. Moreover, overseas territories tends to become distinct from the motherland by virtue of a giant ocean in between the two, allowing a people to develop distinct national identities.
Secondly, Chinese power is simply overwhelming relative to either Tibet or Sinkiang. That China itself was no match for the Europeans is irrelevant. After World War Two, the European overseas colonies successfully fought off the Great Powers; for instance the French by Vietnam. In contrast, once the ruling Chinese regime turned its attention towards it, Tibet was helpless to prevent a military takeover,
Part of this is because despite their geographic size, the native population was very small. With Tibet, the population is a mere three million even today. Sinkiang is a lot more populous currently, but not so for most of history. A paper[1] by Qi Qing-shun of the Xinjiang Social Studies Institute notes that region's population had hovered around one million for most of the time since the Han dynasty.
Moreover, Sinkiang's demographics was devastated by its forcible incorporation into China. The province was created out of the Dzungar Khanate's lands, after it fell to the Manchurian Empire. In addition to just the conquest, the Manchus enacted a brutal extermination campaign that effectively erased the Dzungar people from the their former homeland. Most survivors either fled into Russia, or were enslaved within China proper.
These conditions enable China to establish effective control via internal colonisation. Ethnic Han Chinese settlers now constitute roughly half the whole population in both. Coupled with a strong emphasis on national unity and general nationalism, China virtually ensured it will be able to maintain its rule over both regions.
[1]: Qi, Qing-Shun. "The Major Measures to Solve the Population Arable Land Problem in Xinjiang during the Period of the Mid-Qing Dynasty." Journal of Shihezi University 24.1 (2010).