US-China tensions and the war in Ukraine are already swinging investments to like-minded countries — a sign that companies are making geopolitical bets.