While this situation is definitely not optimal for anyone involved, it's worth acknowledging that there are worse failure states that were avoided in this case.
It's incredibly fortunate for all of us that Hannah pled guilty to sexual assault whilst being a minor. Due to that plea, it means that it is obviously apparent that she identified as a juvenile female criminal and thus the state was able to respect her self-identity as such and have her imprisoned in the appropriate facility accordingly.
If Hannah did not plead guilty, then the state would need to make assumptions about whether or not she identifies as such a criminal to determine whether or not she could be locked up in accordance with her self-identity.
While the state could try to say that she is a criminal whether or not she identifies as such by using such things as "physical evidence" or "the testimony of others", doing so would clearly be "ignoring the identity of a person because they have been an awful person".
Given this set of circumstances, the enlightened state would respect that Hannah does not identify as a rapist or a criminal and thus should not be locked up in a facility for rapists and/or criminals.
Any suggestion that this may result in what the enlightened may call "An increase in the number of instances of sexual intercourse where a failure of communication may have resulted in a perceived failure of consent." and the unenlightened may call "A fuckin' rape spree." is clearly prejudicial as such a result would be something that would happen in the future which hasn't happened yet and is thus unknown to anyone who isn't prescient.
Also, I believe I should point out that for the purposes of this thread, I identify as prescient, and as such I can state clearly that everyone else in the thread isn't prescient because if they were, they would have identified as such already.