You need to get another doctor, and you need to be comfortable talking with them about whatever! Good for you to bring it up, and shame on her for ignoring it and making you feel bad.
When I was younger (about 1

I used to get frequent urinary tract infections. They almost ALWAYS occurred after having anal sex with my boyfriend. We were very careful but nearly every single time 2-3 days later I'd get one. After maybe the 3rd, my doctor asked me, "Do you know why you're getting these?" and I told her that I was pretty sure it was related to anal sex. She gasped and wrinkled up her face like I was doing the most horrible thing, then was sort of stand-offish. There was no way I could ever go to her again! I immediately switched to another doctor entirely.
It turns out that although the anal sex was contributing, it was more the fact that he had an old school NYC bathtub with no shower and the BATHS I was taking were causing the UTIs. Not the anal sex. I changed the way I bathed at his house and didn't get another one after that - anal sex or not. Stupid doctor.