Brexit happened after a long period of political stability in a country with a long, mature history at the forefront of international politics. Communism in China came to the fore during the tumult of the second world war, which had foreign troops razing half of China - after a period where China was colonised by a different foreign power which kept the powers in China as ignorant as possible. They're very different things.