I just spent many hours chasing down a problem trying to get current on an STM32L4 chip down to 3uA in stop mode. Once I initialized the RTC or UART, I could never get the current consumption below 250uA. I thought at first it was a board/GPIO issue, but the RTC uses no GPIOs. Even initializing just this one IP block caused the problem.
I decided to try this on a Nucleo64 dev board I had lying around and the same code just worked.

I finally convinced myself that I could have damaged the MCU during the initial PCB power-on where I had a wiring mistake that took one of the power domains well below its 3V3 nominal value. The weird thing is the rest of the chip worked flawlessly. It was just this odd Stop mode current issue. The MCU even drew the expected current in standby or shutdown mode.
I replaced the MCU and the code I was working on for two days
just worked.
