This is basically how it works in Saudi Arabia. Citizens are guaranteed a job where they can get away with doing nothing. If they happen to be fired, they get a monthly stipend until the government finds them another job. As a result, most of the real work is done by immigrants.
The same people who do those jobs now -- mostly immigrants.
Only citizens would get UBI.
That's why it's really important to have a good minimum wage and protections for those employees, so they don't get abused.