This is often talked about in the context of decriminalizing drugs. If you apply the current behavior to drug users to a world where access to drugs is less restricted, you can come up with all sorts of weird problems, which will simply not manifest because the nature of drug use is completely different when it is not a crime.
Similarly applying the current behavior of restricted migrants to a world where migration is free, is a little misguided.
For example I’m a permanent resident in the UK (under the EU settlement scheme, post-Brexit), but I haven’t lived in the UK for 2 years now. So in 3 years my status there will lapse. I can go back now, but I won’t be able to in 3 years. And I have it easy. Permanent resident status (ILR, or indefinite leave to remain, as it’s called in the UK) lapses in 2 years for people who didn’t gain it under the EU settlement scheme.
I went back to my home country precisely because I knew that it’s no big deal for the next 5 years. I wouldn’t have left if I knew that I’d have to return within 2 years. I would have naturalised, and maybe then. Which, again, costs a lot of money, takes a lot of paperwork, and takes a lot of time. (Which, again, is easy for me, because my home country allows you to hold multiple citizenships. That’s not the case for everyone.)
For non-EU citizens/permanent residence holders (which is actually not as simple to acquire as it sounds) it's a far more difficult decision that it is for EU citizens.
In the extreme case of the United States, if you leave the US for more than 6 months as a green card holder without acquiring a re-entry permit (which is good for only up to 2 years. There's no way to leave the US for more than 2 years as a green card holder and to be able to return with any certainty)
And even worse, virtually all illegals in the US are inadmissible for 10 years after they leave the US, so there's no path to legal status for them at all. And if they have illegally re-entered after deportation, they are banned for life.