First line of reset handler throws exception on STM32G4

I tried to flash with OpenOCD via CubeIDE and this is the error i get:

Error: timed out while waiting for target halted
Error executing event gdb-flash-erase-start on target STM32G431CBTx.cpu:
TARGET: STM32G431CBTx.cpu - Not halted
Error: Target not halted
Error: failed erasing sectors 0 to 2
Error: flash_erase returned -304
Info : dropped 'gdb' connection
shutdown command invoked
Info : dropped 'gdb' connection

Selecting STLink GDB Server as Debug probe works fine though. Does this mean I have to switch to another debug probe in platformio, too? How would I do so?

Thanks!