Trying to move to Sweden, need help figuring out visa

I am a young cyber security professional living in Estonia. I am originally from the United States I originally moved to this country as a student. After graduation I obtained a five year residency permit. However my current goal is to move to Sweden to live and work there. I have been applying for jobs there for the past two years but have not made much progress. I am worried that I have been taking the incorrect approach but I am not sure.
I have several friends who are not EU citizens who have been able to relocate to Finland and Sweden and are now working as cyber security professionals in those two countries. However I have heard several hiring managers tell me that their company policy prohibits them from hiring people who do not already have a residency permit. This does not make much sense to me, both since I have friends who did not have this issue, and also since it presents a catch-22. I cannot get a residency permit without having a job offer and contract, but these companies say they will not offer unless I have a residency permit.
I have been told about one potential workaround. My visa allows me to stay in another Schengen countries for up to 90 days. I may work in that country during that period as a temporary contractor, but any longer requires a residency permit. It would supposedly be simpler to sign a contract with a company for this temporary period and then have it extended, after which I apply for the permit. However this sounds kind of tricky and again, none of my friends had to jump through this hoop.
I wanted to ask if anyone here had any advice, or how may I change my approach?

Hello, As far as I can understand it those friends of yours had come as "high skilled employees who are non EU residents", under this project https://ec.europa.eu/immigration/countr … -worker_en

While since you don't apply as a US citizen and since you don't fall under this "EU resident with 5 year residence permit category" https://www.migrationsverket.se/English … dents.html

You seemed to have got stuck between two EU laws which have made you to neither non EU citizen nor to EU resident with 5 year permit.

Have you tried to apply solely as a US citizen?

(Please note that; everything is written above is only a speculation, I could be totally wrong)

I don't know if I specified this already. I am living in Estonia with a 5-year residency permit. As you said, my friends do qualify as "high skilled employees who are non EU residents" or rather non-citizens. Since I graduated from the same program as them and have similar work experience my impression has been that I would also qualify as a high skilled worker in a specialized field . . .

"Persons who have lived in an EU country for at least five years with a residence permit may apply for long-term resident status in that country. Persons who are granted long-term resident status receive a special EC/EU residence permit. This gives them certain rights, similar to those of an EU citizen. This makes it easier for them to move to another EU country in order to work, study, start their own business or live on their pension, for example." Do you fulfill the line that is boldfaced?

I have only lived in Estonia for four years, not five. And in any case my residency visa only applies to Estonia

My guess is either you have to wait for another year to fulfill to obtain your full EU rights or apply as a high skilled non EU resident, as I said earlier solely as a US citizen which make you to high skilled non EU citizen.  All the best!