I have a board with the STM32L476RET6, the shutdown mode worked a time and now it resets just after the STM32 enters in shutdown mode. I tried the same program with another same board and the problem does not appear.
I thought it was a problem with an interrupt but even if I disable all interrupts, the problem persists. I also disabled RTC clock.
Thank you for your help,