Some consider a hug sexual harassment, some consider touching a knee. What about putting your hand on a person's back? Does it make a difference what part of their back, if so exactly how and where?
Sexual harassment should be far more about intention rather than the specific part of the body touched (excluding the obvious no-go areas of genitals and breasts). Generally you should be allowed 1 strike, for mis-reading signals.
In a society where men are expected to initiate contact, this is a fraught situation.
It is not a simple answer.