How do we keep him from resigning? We throw him in prison and take away his pen and cell phone.
Just like President Ford did with President Nixon, if Obama were to resign, the new President Biden would premptively pardon Barry for any and all crimes that he may have committed, before any trial could take place.