You are missing an important point.
If they both resigned, then the Speaker of the House becomes president. If these resignations happened now, then Nancy Pelosi would be president. Then she would nominate a replacement vice-president, to be confirmed by the vote of House and Senate.
And as I wrote, in January with a Republican House. McCarthy might find himself as president or residing over the constitutional issue AFTER Pelosi is gone. (If Pelosi were smart, she’s got a month to pull it off and move into the White House.)