That is the question.
https://www.foxnews.com/world/uk-opposition-leader-denies-calling-pm-may-a-stupid-woman
The answer is: no. No, because she really is stupid, judged by numerous criteria. It is not to say that female politicians are in any way “stupid” because they obviously are not. It is simply a judgment about her, and would hold if she was a man. We can debate the numerous policy blunders that make her stupid, and perhaps the judgement is harsh, but maybe not. Yet, it is not sexist. It is a debate about facts, and gender is irrelevant. Perhaps it would be better to just call her “stupid” simpliciter, and get it over with.