If that country forms, it would have militarily enforced borders.
Some people would be allowed in.
Others not.
Status in the previous political alignment largely irrelevant.
Thats kind of how you stop a repeat.
I'm guessing that advanced degrees in gender studies and published papers on critical race theory are not a guarantee of admittance.