Foreign investors lost their nerve on parking money in China over the past year, as Beijing cracked down on the country's biggest tech companies,…