Always Told How to Behave around women to make them feel safe. But never been told what to do if someone harassed me

So I am always being lectured on how to behave around women to make them feel safe. Example: Cross over to the other side of the street at night if a woman is walking on your side of the street. As good as that advice is on how to make women feel safe, the flipside is that advice made me feel demonised. Like I was someone to be feared.

But when a drunk woman slaps me in the ass, it made me think. I was always taught how to be respectful and non-threatening around women. But never in my life was I ever taught how to react if a woman harassed me. Like I was not expected to know how to behave around women. But expected to know how to defend myself against abusive women.

Is it just me that feels demonised by feminism or am I not seeing the bigger picture?