People who act that way are usually insecure about something and have an overly developed need to control every conversation. If you don't act the way they expect, they try to bully you into complying with whatever behaviour they want. It's a sign of weakness, really.
Try calling them out on what they do in an overly friendly, advising way. "[Name], are you aware that the way you speak to me would be considered sexist by most people?" Said in a helpful, confidential tone. The way you would tell a two-year-old that it hurts the puppy when she hits it with a stick. Being a jerk, he will then deny being sexist and try to shift the blame on you. So you continue "I am sorry, I was just trying to help. You always seem to get so frustrated when we talk. Like when I don't look at you, and you immediately think I'm not listening. Why would you feel that way?" Ignore all accusations and steer the conversation back to the fact that they must be uncomfortable and you want to help. Act perplexed by what they want from you, after all, other people interact with you just fine and don't need constant confirmation that you're still paying attention. By the way, do give constant confirmation. "I hear you." "I am still listening." "I understand."
My experience is that this makes them so uncomfortable that they cut the crap really fast.