Beijing is keen to woo foreign investment amid heightened geopolitical tensions, as policymakers try to boost domestic consumption to offset the impact of U.S. tariffs.