refugees fleeing their govt are expected to flee to the next closest country of safety... not travel a quarter of the globe to get better social services.
at that point, they’re invaders... but if the country they’re invading doesn’t stand opposed to them being there, they might as well have been invited.
What you said in your first sentence is true, it‘s the rule under UN usage. Still, in fact it hardly ever works out like that, since so many then continue traveling until they have reached a First world country. It‘s fraud.
And of course the governments in the First world don’t want to be called racist, thus they do nothing☹️
Same stuff all over the First world. Grumble.