I don't think UK will exit EU, it sounds like their government is trying to get a better hand in negotiations that's all. UK leaving EU would destroy post-WWII order.
Having that said - it's right of their society to vote whatever they feel is right, permament resident status is the answer.