Yes, in the US, at an airport, I was selected for additional screening by a TSA agent. The agent put on gloves and patted me down. He had me extend my arms out and said he was going to check my waistband. When he got around to the back, he shoved a finger down my ass crack and wiggled it, then continue on. It took half a second. My mind blanked.
I called to make a complaint the next day but got nowhere. Too late, too "minor", not enough details or evidence from me. I was told it didn't really happen, because if it had I would have spoken up in the moment.
If I am ever selected for patdown again, I intend to ask for an agent of the same gender as me, to have a supervisor observing, and cameras recording.
This was at least a couple years before COVID. Who knows what the protocols were then versus now. Best I can find is that a person can request an agent be of the same gender, but TSA doesn't have to comply with that request.
It seems they're also supposed to offer choice between patdown in line or in a private room. I was never offered a private room option, nor would I take it unless I could have witnesses and video record. Forget going into a room alone with any LEO of any gender.