They get around that the same way Christian sects have gotten around it: declaration of heresy. All the other commies are real commies, they’re getting it all wrong. That’s why most of the political analysts thought it was a lot more likely for the USSR and China to get into a shooting war than either with us.
In the late 1960s, there were Soviet and PRC forces in North Viet Nam by the tens of thousands and all seemed rosy until the PRC declared the USSR to be “revisionists”. At that time, the North was in the Soviet camp. Whaddya gonna do?