They joined a political party and by doing that you sign up to collective responsibility. Many of them had been in cabinet which is also bound by collective responsibility.
In the Tory party, as I have previously stated, whether you agree with the party position or not, it overwhelmingly selected a new leader to leave on or very close to the 31/10 with a renegotiated deal, or no deal.
You can argue whether that is what the country wants or not. But that is what around 90% of Tory MPs voted for and the membership.
The principled position after the election of Johnson for these 21 would have been to resign the party and either stay independent or join another party, then call a by election.