China's foreign policy was completely unhinged during this period.
The transition from leadership by a war hero guiding a fledgling country through difficult circumstances into a more "relaxed" leadership governing over a more stable and peaceful country is a conundrum that AES states struggle with. Mao attempted to prevent that transition by any means necessary, and splitting with the Soviets, training the Khmer Rouge, and normalizing with the US were driven by that fear, fear of a Chinese Khrushchev.
From a big picture, outside view, and with the benefit of hindsight, it's easier to say the Khrushchev and Deng were the result of changing material conditions, and no matter how hard one tries to stop it, changing conditions lead to changing leadership.
However, if you're the wartime leader it's harder to see that, not only for self-interested reasons, but also just in terms of personal experience and personality. The person most capable of leading the revolution to victory is generally not a person who is easy to convince to stop seeing threats everywhere. I agree with what seems to be the prominent strain of thought on Hexbear that people like Stalin and Mao were necessary but also that modern China is socialist. Unfortunately, I don't really know what the solution is to get from point A to point B other than waiting for the leadership to die.
Imo Mao really put the cart before the horse with his concept of "permanent revolution," as if the end goal of leftism is to create ideologically pure revolutionaries. The goal is to create a more peaceful and equitable world where we don't need revolutionaries.
In any case this is a definite black spot on the PRC and it's worth noting that it's history is pretty messy in general. Don't think you can or should defend everything.