Her low favorability, in part due to her perceived unlikability and untrustworthiness, was a key cause of her defeat. It's entirely possible, probable even, that sexism helped fuel perceptions of her as unlikable and untrustworthy. However it is very difficult to separate what levels of her unpopularity were caused by sexism or whether it was due to other factors and not an inevitable consequence of sexism. Saying all of her unpopularity was based on sexism would be foolish and probably saying none of it was based on sexism would be foolish too. Perhaps it made enough of a difference for her to lose narrowly instead of winning narrowly. Perhaps her own mistakes were the primary cause but were bigger mistakes due to sexism.