I've discussed this on here before. This isn't a new thing. When I was working on secure MH wards 10 years ago we had a transman admitted to an all male ward.
Staff absolutely raised a number of concerns around safety, searches, dignity - worries for both themselves and the patient.
The results were confused policies that referred only to gender, compromises where we could get away with them and high stress levels all round. We couldn't just put the person on 1:1 because that would be restrictive to their liberty, dignity and rights and effectively we were being told to treat them like any other man as that's how they viewed themselves and to do so otherwise would be discrimination. We were allowed to have female staff do pat down searches, so male staff didn't have to touch the person's breasts but mostly because this was the person's preference. If they had insisted on being searched by male staff like others we'd have been really stuck. We made sure they ended up in a room close to the office and not off down a corridor but I don't think we could have justified that if someone had started asking questions.
We were all very aware of the risks and none of us were happy about it but the decision to admit did not sit with ward staff. I also couldn't say if it got mentioned every hand over (so a bank or agency staff member there for 1 shift might not have been told - they would have known when they met them).
This case is sad, but not in any way surprising, I'd be more surprised if this is the only time that something similar has happened.
Hopefully the clarification around the Equality Act will mean this can stop and we can actually have single sex wards for all the very good reasons we are supposed to.