There’s a well documented paper trail of the post-1991 citizenship / legal-status fallout after the breakup of the SFRY for how citizenship choice + residence status was operationalized and litigated. It ended up discussed at the European Court of Human Rights and Council of Europe. You can look up ‘statelessness’ and ‘the erased’.