Yes, well kind of
Resigning would have been the right thing to do
See also
Rishi Sunak
and
Jeremy Hunt
and
Boris
for posterity (I hope)