It's the responsibility of political parties to make themselves electable, and in a free and fair election, it's the responsibility of voters to follow their own conscience. There's really nothing more to it
What happened with the election of Jeremy Corbyn as leader was the turning to a 'causes' type of campaigning, rather than pragmatic assessment and government. It was all about radical socialist change.
Jeremy has been at the forefront of every trendy leftist cause since his student days. He does at least have integrity in that way. However, some of his many positions and alliances have also been the authors of his downfall. Labour lost two seats in GreaterManchester which have very large Jewish communities. and the militant/Trotsky type bullying in some constituency parties where I live in Liverpool, has meant I could not permit myself to vote for my Labour candidate - and that is without mentioning Dawn butler and the issue of Self Id.
Of course, Labour still cleaned up in Liverpool and its wider region, though.