How to make SMT32 chip programmable while it stuck in Standby mode?
Connecting the SWD with NRST asserted, halting the core, releasing reset and doing a mass erase will work.
The problem is NRST.   A lot of software tools default to commanding reset via an SWD sequence, not using the hardware signal until you find a buried mode option.
Worse, your &quot;fake&quot; ST-Link probably cannot drive its NRST signal at all, as those boards all seem to have a mismatch between physical connection and firmware so the pin toggled by the MCU never makes it to the connector.
Using a fully functional debug adapter that acutally drives NRST is going to be key if you work with suspend modes, as you'll see this issue over and over.   You could get a real ST-Link or whip up a CMSIS-DAP in a supported eval board, etc.  Black magic firmware might fix your fake, or you can consult schematics and do microsurgery on it, easier if it's a TQFP than QFN inside.  Have a raspberry pi?  You can use the GPIOs as an SWD under openocd, just don't try to steal its 3v3 but regulate your own.