It probably cost some votes, but those polls didn’t have the actual reasons people didn’t vote for Harris. That is: she is a woman and she isn’t white. It’s the hard truth but no poll is going to include “are you racist?” or “are you sexist?”
Also, anyone with even part of a brain knew that trump is going to make things a lot worse in Gaza than Harris.