Earlier quoted context omitted.
No, you've got comparative advantage crucially wrong. If country X can produce food a bit cheaper/better than you, but produces shoes much cheaper/better, then you end up growing at least some of your own food and importing shoes from X. https://www.econlib.org/library/Topics/Details/comparativead...
Comparative advantage has nothing to do with it. The market price of a global commodity has the opportunity costs already priced in. It's the reason more prosperous countries have higher labor costs. If you and some other country are producing food for the same cost (e.g. because you pay more for an hour of labor but have better automation), adding the same cost to each doesn't affect your competitiveness. You both s…
And the local transport costs are identical between local and export farmer, while local production is more expensive on labor and fuel.
The only thing to do is to raise duties on food and... it is risky politically. Alternatively, subsidize much more. Good luck!