Seems like this decision was made strongly based on this individual’s history and that everyone’s safety was considered.
Indeed - the judge's own words deserve consideration.
“It is not without some reluctance that I thus dismiss this judicial review application, because it means leaving Ms. Cooper, a woman, in a male institution. These reasons and judgment should not be viewed, however, as any kind of blanket determination that a transgender or gender-diverse inmate who is designated as a [dangerous offender] cannot be transferred to an institution that aligns with their gender identity, and that may happen eventually for Ms. Cooper. Each such case will depend on their unique circumstances."