Gender identity is a protected characteristic, so discrimination by employers (or anyone else) on that grounds is illegal. I'm not aware of any exceptions for military service or police.
There are certainly trans-identifying police officers. One of them, while still in the force, caused a huge amount of trouble by harassing Harry the Owl online, and was told by his superiors to create sock accounts to do it rather than using his trans name (Lindsay something). Eventually, however, his behaviour escalated to the point where he was dismissed. He is currently a full-time online troll impersonating a gender-critical police organisation.
Others who are still employed are noteworthy for their insistence that they must be permitted to carry out intimate searches on female suspects (and I believe even on women visiting relatives in prison) , and that to bar them from doing this is a breach of their human rights.
There are "gender-fluid" police officers who have two sets of identity cards and even, I believe, two email addresses, to allow them to inhabit either their male or their female alter on whichever day they fancy.
That sort of comment makes me uneasy too. Every demographic contains unpleasant people. Even if one particular demographic contains more unpleasant people than average, that still tells you nothing about any individual member of it. Prejudice against an entire demographic because of the behaviour of a subset of it is always wrong.
I see this differently. We are constantly being told that to prevent the supposed "pleasant" trans individuals (assuming they exist) from being granted access to women's single-sex spaces is discriminatory and hateful. That it is "prejudice against an entire demographic" because of the behaviour of a highly unpleasant subset, and that this is wrong. I am happy to let the "not unpleasant" ones get on with their lives. But the moment one of these people insists on being given the right to breach women's single-sex boundaries, he is no longer "not unpleasant" in my eyes.
I am interested in highlighting the unpleasant ones in particular, because as soon as we give in to the pressure not to "discriminate against" trans people on the basis that
some of them are OK individuals, we inevitably open the doors to the unpleasant ones.
There is of course the argument that any male person who wants to invade women's single-sex spaces is quite clearly
not an OK individual, that his very presence is a violation of privacy and dignity, and that this in itself robs women of their right to single-sex intimate spaces. Nevertheless I think it's important to highlight the extraordinarily large number of outrageous exhibitionists, perverts and sex criminals among the trans-identifying male demographic, as their existence brings home the worst consequences of pandering to the demands of the trans lobby, even the aspects of it that seem more reasonable.