I'm pretty sure they wouldn't have to leave if the UK leaves. Most of them probably fit the criteria to remain where they are :
* Have a job, or are student
* Own private property (house, company) etc.
Generally that's the criteria in 99% of all countries of the world, to remain there as long as you wish or until special visa expires (ie students).