Add one diode and a voltage monitor. Put the battery over 3v3 after the diode. That will be the mcu supply. Nothing else. You can safely run a 3v lithium battery like this.
As soon as the voltage monitor trips, run an high prio interrupt, put all IO into high-impedance, disable any clocks and peripherals. But this might still droop the battery voltage too much during the transition. you can only draw a few mA. It cannot take the full MCU with 10's of mA, not even for a while. You might need an additional stage with a capacitor bank to bridge a few milliseconds.
But you'd save yourself a lot of potential nightmares if you'd get a chip with internal power switch for the RTC, or an external RTC.