If an employer ever asks you to resign, tell them "no".
There is no benefit to resigning unless you have another job lined up already.
Make them fire you. Get your unemployment benefits. Make sure you are legally protected in case of malfeasance. Resigning undermines all of that.
This message brought to you by AWS telling workers to return to office 5-days-a-week by commuting or relocating, or they should resign.
Again, the answer is "no, you'll have to fire me."
EDIT: To clarify, in most areas "fired" and "let go" are not legally meaningful terms and can be used interchangeably. The important term is "for cause" or not. So don't commit misconduct to get fired. Poor job performance is typically not a "for cause" reason, nor is failure to accept changes like RTO