An easy solution to this would be to grant those individuals legal status once they are in the country.
(Yes, I know this has many many other consequences. I am not necessarily actually advocating for it just happening with the stroke of a pen. But holding that up as a reason to prevent immigration itself rings hollow to me.)