They were in favor of the free market from Reagan onwards. But the party was founded on the premise that tariffs would protect their northern constituents and industries, and they took over a century to shake that tendency. Perhaps the only Republican president before Reagan who was in favor of lowering tariffs was Eisenhower, as part of rebuilding globally after WW2.
https://en.wikipedia.org/wiki/Morrill_Tariff
https://en.wikipedia.org/wiki/Smoot%E2%80%93Hawley_Tariff_Ac...
https://en.wikipedia.org/wiki/Nixon_shock
Meanwhile, as others have pointed out, our current president has been advocating for tariffs for about as long as the Republicans were in favor of the free market.
https://www.pbs.org/wgbh/frontline/article/trumps-tariff-str...