I wouldn't try that in a backyard alley in a "working class" part of the city, though, especially if they are male. Most of the time it would be OK, but there's a real risk of some idiot being "insulted" by that and reacting stupidly.
I've talked on the internet with a transgender girl that moved from USA to Poland for some time, she had family there, and after a few months she moved out, couldn't handle the shit her family gave her and the looks. So yeah, it's not pretty. Violence wasn't a problem apparently.
[1]: http://www.pewforum.org/2018/06/13/young-adults-around-the-w... [2]: https://cruxnow.com/church-in-europe/2018/10/06/church-in-po...
Of course if you ask a local if they know someone who got beat up for their identity (be it nationality, language, race or gender), they will usually respond affirmatively... as would quite a lot people in the West. Just don't mess with drunk idiots and you should be fine. Also, based on my observations, there's way less harassment towards women here than in the Bay Area, for some reason.