Transgender inmates had previously sued the state, arguing that keeping trans women in men’s prisons violated the Eighth Amendment.