There does need to be some flexibility though, a transperson post surgery fully transitioned for a non violent offence is just not the same as a violent person, perhaps a sexual offence who only proclaims to be trans once in the justice system.
I don't think people should have the right to commence transitioning once in the criminal justice system, but allow common sense judgments to be made on welfare and practicality grounds for those who transitioned. This flexibility should never be applied in sexual offence cases.