This is one reason why some companies have located engineers in Canada under subsidiaries. Canada not only allows you to deduct R&D costs as an expense, but there is an extremely generous R&D tax credit that yields a negative tax rate on engineers. For Canadian controlled private companies, this represents as much as a 60% refundable tax credit on R&D salaries. For foreign-owned companies, the benefit is smaller but still significant.
The Trump tax policy was a bizarre move for a country that relies so heavily on homegrown innovation. But then again, so was the entire Trump presidency.