I haven't experienced that (but I imagine I may in the future), but I wanted to offer my condolences. That must be frustrating, awkward, and embarrassing.
Maybe the officer didn't tell him anything? He might have just been confused because you're obviously male but the guy was referring to you as a female. I remember when I was seen entirely as female, and people used male pronouns, people got extremely confused. The vast majority of people never thought I was FTM, or never thought "oh I wonder if that person was born a guy." They just thought "why are they calling this girl a he?" and felt awkward because they never knew how to proceed or make sense of it.
If he did tell, that's pretty crappy for a police officer, I'd expect them to hold themselves to a higher standard than that, you know?