Connect with STM32CubeProgrammer and change the nBOOT_SEL=1 and nBOOT0=1 option bytes to boot to flash regardless of the state of that pin.
Edit: My eyes saw BOOT0 and my mind read NRST.
The STM32G0x1 has an NRST_MODE option byte. But I don't see that for the STM32G0x0 series. Seems like you can't use that pin.
There is this note in the datasheet which suggests it's not possible to have these in another other than input mode:
For the device in SO8N package, the PA0, PA1, and PA2 GPIOs are bonded with NRST on the pin 4. In order not to interfere with device functions, they must not be set in alternate function or in output but remain at all times in input configuration.