The prime minister came under heavy fire from all sides of the House of Commons over the draft Brexit agreement amid a flurry of government resignations.