The last time such a level of investment was seen was in 1993. However, it’s important to consider dollar inflation. In constant dollars, current foreign investments are comparable to those of the 1980s when China was just opening up to the world.
It’s also evident that the exodus of foreign investors resembled a panic, given the sharpness of the decline. The trigger for this trend was likely the Special Military Operation and China’s support for countries with strongly anti-Western policies (such as Russia, Iran, Venezuela, etc.), suggesting that the reasons are political.