Remember you also have the RTC backup registers, 128bytes that are kept by Vbat.
In low pin count stm32s Vbat and vdd are internally connected, so you would have to add a small battery or supercap with a series charging resistor, I think the user must detect external VDD somehow and enter Vbat mode by SW, that way only the RTC circuitry is kept.
Not sure, never used it, but it's a userful feature!