Seems a bit of a sexist law if ever I saw one. If it's okay for males, why are females excluded, transgender or otherwise?
That said, good on her for calling out the authorities on this: they can't recognise her as female in one instance, and male in another.