Upload the binary file, might give some hints.
Before programming, are you checking if the config RDP and WRP protection bits are all off?
If PB8 blinks, and it's not the power supply itself, clearly the MCU isn't being erased.
Must be the psu somehow. Have you checked the output with a scope? Maybe a slow turn-on or noisy output is triggering it.