Until relatively recently, party affiliations were not printed on voting slips and I think we should return to this.
An MP is a representative not a delegate. When they stand for election, voters are voting not just for a party but also a person, in the past it was quite acceptable for a candidate to have strong views on certain subjects that were not entirely in harmony with party policy. In the past political parties could contain members with widely varying views, but sharing a mutual philosophy and working together for a common cause.
If you vote, you should vote first for an MP then for a party. If you do anything else you are not treating the ballot with the seriousness it deserves.
Yes, there are exceptions, being convicted of a criminal offence, regardless of the sentence and, what I could best describe as, moral turpitude' sufficient for you to have the whip withdrawn and for you to be excluded from party membership - sexual harassment, fiddling expenses etc.
But beyond that, the MP and their views remain essentially those they had when elected, why should they resign over a label.