That would be a reasonable solution if there would be any government who could provide a digital attestation scheme that allows to prove attributes without giving out the identity. Afaik it's possible technically. Just not wanted apparently
Like proving I am at least 18 years old without giving out my birth date or name.
https://www.wired.co.uk/article/gaming-china-crackdown