US and European firms shifting investments away from China