Yea they want to head back (now that they realize nobody cared), but they pulled out of China entirely back in 2011 over censorship.
The truth is, these companies were never competitive in China because they never put in the work. Established western companies are not use to the level of competition in China. It's simplistic to say CCP is just arbitrarily picking domestic winners. Thousands of domestic companies (as in the case with ecommerce going toe-to-toe with Amazon) were busy out competing each other and western challengers. When it came to western social media bans post 2007, Chinese companies were hiring tens of thousands of content moderators with understanding of Chinese filtering rules for compliance. Western companies simply gave up and didn't learn how to scale content moderation until the last few years when social media had to deal with the same violent extremism that China did during the Tibetan and XinJiang riots that lead to FB/Twitter ban. As evidenced by current Youtube debacles, Google still can't / refuse to get human content control right. BTW both these companies can reenter anytime as long as they conform the same rules like Bing. Regardless, the government didn't have to tip the scale much to crown a domestic champion over western companies.
See AI Superpowers by Lee Fu Lee,previous head of Google.cn for an overview of Chinese competitive environments. There's lots of extremely technical fields where China is actively conducting industrial espionage and coercing tech transfers in (IC, airplane engines, military stuff). But cloning and improving software is not really one of them.
Despite continuous friction with the Chinese government, Google's share of the search engine market in China had grown to over a third before it decided to pull out: https://www.wsj.com/articles/SB10001424052748703465204575207...
Google hasn't pulled out of other markets where it faces strong local competitors, such as Yandex in Russia, and it remains popular in Chinese-speaking markets outside of mainland China such as Hong Kong and Taiwan. That the developers of the Google Pinyin input tool were found to have copied data (something other companies in and out of China have also been guilty of from time to time) is hardly evidence that Google in general was not competitive.
Ironically, the fact that under Pichai a return to China was seriously contemplated would suggest that financial reasons alone can't explain the original decision to leave.
Similarly, YouTube wasn't forced to pull out of other markets where it faced competition. Also, YouTube was frequently blocked by Chinese authorities even before Google decided to pull out: https://www.wsj.com/articles/SB10001424052748703465204575207...
Competition may explain in part why Google hadn't conquered the Chinese market before it left, but conflict with the Chinese government, in the form of official censorship as well as illicit hacking, would seem to be the main reason why Google pulled out of China but not elsewhere.
Unless of course learning to comply with such demands and intrusions is included under "understanding the Chinese market".