fall on your sword

Avanzado (C1)formal

Resign or accept punishment to protect others or admit fault.

"When the scandal broke, the minister fell on his sword and resigned immediately."