The strategy seems more about decoupling and independence from foreign interference and potential sanctions. Likewise, when foreign investors leave it is also because they've seen what was done to Russia and thus don't want to repeat that with China, which would be massively more costly.
Edit with data:
In 2022 Chinese households accumulated $1tn in savings, just over that year (this is something typical in China because of lack of safety net and lack of investments avenues, hence also why everyone wants to buy property to invest their cash): https://www.crugroup.com/knowledge-and-insights/spotlights-b...
China also has $3.2tn in foreign cash reserves: https://en.wikipedia.org/wiki/Foreign-exchange_reserves_of_C...
They also use that cash as a tool of foreign policy with loans to foreign countries in excess of $240bn: https://www.reuters.com/markets/china-spent-240-bln-bailing-...