It’s not the term itself, it’s how it’s used. And it’s sexist because no one ever accuses male characters of being a Mary Sue, or a Gary Stu, or Harry Flu, or whatever.
Wesley Crusher (a man… sort of) is quite possibly the most referenced Mary Sue character in the history of fiction. He is even mentioned in the Wiki page!
Mary Sue is not sexist, this is language police gone mad and I guarantee it is not offensive to 99% of human beings on the planet earth. Pretending that it is sexist is a disservice to people who have experienced legitimate sexism. When at a restaurant while visiting Turkey, a relative of mine witnessed a woman get kicked by her husband for merely making eye contact with a male server. That is sexism. Uttering the term Mary Sue is not.