In all fairness, people have varying definitions of what “hitting on you” means. In a previous job, every so often I would be talking to one of my female coworkers at a happy hour and she would say something like “don’t you have a girlfriend?” I would tell them that’s a bit presumtuous to think that I’m hitting on them simply by talking to them.
Also, “hitting on you” isn’t necessarily sexual harassment. It becomes harassment when it’s repetetive, involves unwanted touching or vulgar and unprofessional language.