Mao didn’t back the Khmer Rouge against the Vietnamese as he was already dead by then and neither Sukarno or Nasser (in Egypt, not Lebanon or Syria) were dictators
Mao himself and his policies were instrumental in funding the Khmer Rouge uprising through the 70s--over 90% of the aid they received was from China at the time, and the Cambodian Genocide was literally based on Mao-era policies and assisted by CCP officials. There is no reason to think that if Mao lived longer he wouldn't have definitely supported Cambodia over Vietnam in 1978, and my original comment is on the general comparison of the USSR backing (North) Vietnam and the PRC backing (Khmer Rouge-faction) Cambodia during the whole relevant period from the 50s to the 80s.
The gang of four and Deng continued the backing of Cambodia over Soviet-influenced Vietnam, but I'm inclined to believe that the failure of this is what led China to a relative thaw in aggressive foreign policy afterwards. Will admit my historical understanding here is not close to perfect though.
Of course, this is completely irrelevant if you want to believe the weird conspiracy that post-Mao China only wanted to support Cambodia over Vietnam in 1978 to get-in with the US (since Deng is an "impure capitalist" or something), despite this view completely ignoring history before 1978 and the PRC literally backing recognizing the Khmer Rouge first and the US literally trying (in maybe not the most productive ways) to stop the Khmer Rouge takeover in the early 70s.
Sukarno after 1959 was definitely authoritarian (title asks "dictator/authoritarian"), and so was Nasser. I never claimed they were dictators.