When an MP decides they want to defect to another party a by-election should be automatically triggered to allow the constituents the opportunity have their democratic right to agree or not with their elected official.
You may be interested in these active petitions
Regardless of political views I believe you vote for both the individual candidates and their stance on issues and the more general direction and policies of the party they stand for. When an MP decides that they no longer wish to be a member of the party they stood for when you voted for them the electorate should have the opportunity to also change their mind by voting in a by-election.