The US-China AI race has served as a driver for major American tech companies to shift manufacturing elsewhere.