That's why I said "large enough country", that'd would allow to retain the scale somewhat. And if you look at the examples of Iran/EU trade and Russia/EU trade, perhaps the exports won't even go down that much, so perhaps doubling down on R&D to keep being competitive would even be feasible.
We'd lose the economies of scale that come with being a major exporter to Europe and South America, for starters. Which would lead to an R&D disadvantage. Which would further widen the gap. Strategically protecting industries is very different from blanket sanctions / capital controls.