An important point I think is each of those countries early transitions phases did not happen simultaneously which allowed Deng Xiaoping's led CCP to learn from the USSR's mistake throughout the years.
To add to previous answers, an important bit on the sociological front was discussed in the new book from Jude Blanchette, China's New Red Guard. The Russian CPSU early on accepted and even participated in the critic of past leaders, namely Stalin and Lenin, to different extent. This really erased the remainder of legitimacy that the party had and was felt in the popular support.
Chinese CCP under Deng Xiaoping, and really up until Xi Jinping has been struggling with the balance of how it would repudiate the economic philosophies of Mao, while keeping the CCP record more or less intact, hence retaining legitimacy of power during the economic transition. What few realize is no CCP leaders since Mao were far left revolutionary as they claim to be, both economically and socially, and the the leftist fringe of political power in China (coined
neo-maoists) had been keeping the CCP in check since Deng, who was a master at navigating between reformists and hard-liners in the 1980's. Xi's arrival changed that as he sided more strongly with neo-maoist desire to keep Mao's legacy critics-free. Xi's sees it as a way to strengthen his legitimacy and unite both side of the Chinese political spectrum.
Without Putin's foreign policy blunders (and the fact that he's redifining 21st century dictatorship), Russia could be in a great shape right now, given the relative free-although-highly-corrupted-and-extractive market policy of the past years and its natural resources. Only difference is that it was not technically done under a "The Party". The only difference in China is that what I mentioned allowed the CCP to retain legitimacy and stay in power, while reforming the economy to a free-er market and claim credit for it.
TLDR; China learned from the USSR's mistake, had better control over its history narrative, was somehow lucky, and had a big enough market & cheap import to have foreign power ignore it long enough to become a major power.
Last thing is we also need to remember that for the past few decades, China doesn't have the USSR to lookup to in order to adjust and therefore all they do can be considered "pioneering", although it sounds a bit weird in that case.