> and in return being kicked out the moment the Chinese did not need them anymore
This is just an unfalsifiable claim, devoid of empirical content. If you cite any of the numerous American companies with significant presence and revenue in China, say Starbucks, the reply will be that they are still there only because "China still needs them." But in what sense does China actually need Starbucks?
If the answer is "in the sense that Starbucks creates NNNN jobs and contributes to the Chinese economy", the exact same reasoning can be used to conclude that Chinese companies operating in the US are there only because "the Americans still need them." TikTok for example employs 11k Americans! Likewise, if the answer is "in the sense that Starbucks has something special to offer", the exact same thing can be used to conclude that Chinese companies (you can again use TikTok as an example) operating in the US are there only because "the Americans still need them."
In other words: 'need' can be taken either in a stricter or in a looser, watered-down sense. In the stricter sense, it's simply false that American companies are kicked out the moment China no longer needs them. Case in point: Starbucks, which is not strictly needed, but not kicked out either. Conversely if you take 'need' in the looser sense, foreign companies in any country still operate there only because "the locals still need them," and there's nothing unique about China's situation.