Hi there,
OK , SO the factory firmware will only restore it’s bootloader and properly cleared flash, You will then need to put it in BL mode and flash a user code to it, Or use the blinky example from the link you posted.
This will do two things, One Verify it’s working and two that you can flash it correctly , Then try YOUR code and see what you get.
May take a few attempts.
HTH
GL PJ