Absolutely NOT
We elect a person, not a member of a political party.
The whole basis of your assumption is that for someone to leave a party they must have changed their political beliefs - it is an equally valid argument that a party may change thus making continuing membership untenable.