A hard-fought race by U.S. and global law firms to expand into China has turned into a retreat for many, thanks to growing pressures on foreign businesses and converging economic and geopolitical challenges, according to new data and interviews with lawyers and legal industry experts.