-
It's really clear (I mean, more than that the EU referendum was just advisory clear) that you are voting for a candidate, not a party, because that is one of the defining features of the First Past the Post electoral systems.
If the MP dies in office, then the seat is vacated, if you voted for the party, the party could just replace them.That people don't understand this should have been a warning for the EU referendum.
If you resign from the party for which you stood, and were duly elected, there should be no continuity. There should have to be a bye election/re-run to give the electorate an opportunity to confirm whether they were voting for a candidate or a party.