Critics contend that the measure will scare off the foreign investment that President Trump wants to attract.