I travel a lot with my passport (Male). In summer, I try to wear minimally to avoid any unnecessary ransack in the airport. I sometimes wear miniskirt and heels in the airport and the airline staffs clearly know that I am a male, but they never ask about my gender identity. They just try to be kind.
In TSA, there could be some confusions, but no harassment so far, except one event. Usually female staffs ransack me. Once a female staff shouted like "he is a man!" as she already saw my ID and another female staff tried to ransack me. At that time, I was really upset and admonished her not to shout like that way.
In the last summer, I visited Slovenia via Istanbul. They just compared my face with the photo in the passport. I wore minimally and nobody ransacked me.
At Slovenia airport:

barbie~~