He could just grandfather the existing gays/trannies in and apply his new policy going forward.
Yeah, but then you'd have the issue of gays lying to get in, and then two different sets of rules for personnel depending on when they joined. It's not really feasible. Although you msy be right. It would take time to undo it, but I suppose it would be possible. You'd probably get some pretty wicked public backlash over it, though. Maybe the best way is just to let commands address it informally. Transfer them out of more desireable positions, relegate them to the
rear area, etc...
But the trannies are pretty easy. As soon as you stop paying for hormones, allowing cross-dressing, etc., and treat them as their genetic gender, it basically disappears.