I doubt that anyone can tell you with certainty, how this will work in the future. The only thing one can say is that the current system will have to be replaced after BREXIT as the current agreements will be void. Even the basic situation of non resident British Citizens is unknown. Will non resident, non citizens contributions even be recognised.... Is there still some possibility for some kind of special agreement for Ireland because of NI.... we just don't know.
But given the current situation in the UK I would not be surprised if non resident non citizens go shafted. Shafting foreigners stealing our benefit is a popular vote catcher.