The welfare system doesn't work well with integration either. If all that is available to you are bad jobs due to your lack of job market / language skills, why work if welfare pays almost the same?
I think Sweden does a decent job integrating those migrants who arrive with sufficient skills for the job market. It's the rest that are problematic, and they would probably do better in the US with its lack of welfare state.
Tbh I doubt it. If it's anything like German society, which is incredibly insular, just being non-German is enough to make you unwelcome.
As a (technically) second generation migrant born and raised I doubt this. This is a sentiment mostly only shared by isolated liberal wing of the society, who probably don't really mingle with expat population beyond surface chatter.
And it's not just some racism sentiment but as the post you replied to insinuate, general xenophobic / supremacist sentiments. I even know other (white) Europeans with great education and jobs getting sick of this place because just how condescending and unfriendly people in general are, for petty things such as unperfect Swedish. (Native English speaking migrant being the only exception)
What gives me a bit of hope is that this seem to be quite rapidly changing, at least in part of society. I have been working at a company in central Stockholm where none! of about 100 employees had even immigrated parents. I’m working in a large company right now where some departments still are 100% native Swedes, but other, that see what a waste it is to not use all this talent, employ 50% or more first or second generation of immigrants.