"sexism was a factor in her losing the election"

SHE played that card.  At the outset of that campaign, she had a choice to make.  She could campaign for the office based on the fact she was the best candidate and present arguments and planks that appealed to wide swaths of America, or she could campaign for that office based on the fact she would be the first female president and propose planks and arguments designed to cater to women.  She chose the latter, volubly and visibly, and the party backed her in that play.

It's actually pretty simple.  If you want to win a US Presidential election, you have to have wide appeal, north and south, east and west, rural and urban, because that's how the EC system is designed. If your support is too collected, because you CHOOSE to cater to specific demographics, you've just hurt your chances.