What you are talking about is not anonymity, it is identity protection. There are many pre-digital examples of what it could be: witness protection programs, confidentiality of journalist sources etc. They are all established, well regulated and with lots of precedents of analysis of those practices in courts. Full anonymity can and should be banned, but we need to develop some sort of new professional privilege to protect digital identity, where you can speak as Jane Doe, but someone knows who you truly are. Whether it is an independent identity platform, a notary keeping an encryption key, a government agency or anyone else who can be hold accountable, that can be discussed and established not just in a law of a single country, but ideally in an international treaty.