This article has been contributed by M.Dudka.
Some STM32 (for example STM32H725 1) have a built-in Buck-mode (i.e. downconverting) Switched-Mode Power Supply (SMPS). It is not necessary to use it, the core can be supplied also using the built-in LDO (in RM0468, this is shown as variant 1. on Figure 19. System supply configurations), just like in other STM32.
After a new project is created in CubeMX, SMPS-only is set as the initial power supply (even if this is not the factory setting with which the chip starts up!)
If STM32H725 is connected to not use SMPS and the user forgets to change this setting in CubeMX (or deal with this situation in some other way), after the program starts to run, it switches off the LDO and the core loses its power. In such situation, it is difficult to connect to the chip using debugger (even "connect under reset" does not work).
One theoretical chance how to connect debugger is to use the short moment after the system is powered up (when the system supply is in the initial SMPS+LDO setting). Connection must be established until the problematic program starts to run and disconnects the core supply (which is a matter of milliseconds). Theoretically, reset (NRST pin) could be held externally active (low) during powerup and then debugger should be able to connect in one of the modes with externally controlled reset. I haven't tested this method, though.
Another way to solve this situation is to connect external power supply cca 1.2V to some of the VCAP pins, supplying temporarily the core, and then erase the offending program.
This is quite an unpleasant gotcha by CubeMX.
[EDIT] MGF reported encounter with the same problem, commenting on the reset behaviour, and coming basically to the same conclusion for practical recovery: I can confirm that holding reset down doesn't help. On initial power-up, there's a couple of milliseconds where the LDO power comes up, and then it falls off to zero. Holding reset low doesn't bring it back. I've seen elsewhere that bringing BOOT0 high should work, but that would be more intrusive than just hotwiring in a 1.2V supply temporarily to hold the Vcore up until the part can be erased. [/EDIT]