Sweden offers a special kind of residence permit for "visiting researchers". As far as I understand this "visiting researcher" permit is different from a proper residence permit and more akin to a D-type "long stay" visa (although I am not certain of this, since as the name implies this is a "permit" and not a "visa").
Concurrently, the European Comission's "guide to VAT refund for visitors to the EU" defines a "visitor" who is eligible for VAT refund as follows:
A ‘visitor’ is any person who permanently or habitually lives in a country outside the EU. Your address as shown in your passport or other identity document will be taken as the place where you permanently or habitually live.
Example: Eduardo lives and works in Brazil but spends three months every summer in Portugal, where he has a time-share in a villa. Eduardo’s permanent address is in Brazil, so he is a ‘visitor’ to the EU while in Portugal.
In some countries, you may also qualify as a ‘visitor’ if you are living in an EU country for a defined period of time for a specific purpose, but your permanent home is outside the EU and you are not intending to return to the EU in the immediate future. EU citizens permanently living in non-EU countries are also eligible for the VAT refund.
Example: Paul is a Belgian citizen but lives permanently in Canada. Once a year, he returns to Belgium to visit his parents. Paul is a ‘visitor’ and can apply for a refund on a basis of his Canadian residence card.
So, as indicated by the title, the question is: Are non-EU nationals holding and traveling with a Swedish "residence permit for visiting researchers" (while employed in Sweden) eligible for VAT refund when traveling outside the EU?