There is a typo in the LL_PWR include for H5XX
This typo uses the wrong bit name:
Arduino_Core_STM32/system/Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_ll_pwr.h:1507:106: warning: bitwise comparison always evaluates to false [-Wtautological-compare]
1507 | return ((READ_BIT(PWR->VMSR, PWR_VMSR_PVDO) == (PWR_VMSR_AVDO)) ? 1UL : 0UL);
This bug appears to be upstream and can be seen in STM32CubeMX as well.
The correction is to read the bit PWR_VMSR_AVDO and not PWR_VMSR_PVDO
bye.