stm32f407 isn't flashing
You tried to drive a line from three different sources:


Programmer
Whatever was connected to PA13
STM32 (very unlikely)


Disconnect whatever you connected to that pin. The programmer tried to drive a line (SWDIO) which was already driven. There are four scenarios possible after you connect that input to a different pin:


Everything works - great, don't do this again.
The programmer does not work - the output of whatever was connected to that line is had higher current capacity and the pin on the programmer burned out due to overcurrent.
Reverse of point 2 - the pin of whatever device was connected there got burned.
PA13 burned.


Looking at your description (USB errors) most probably it's either 1. Or 2., with 4. having very low probability.

Edit: on a board which is not damaged this is a software issue - selecting "program under reset" will allow you to program the device, though debugging with PA13 reprogrammed is not possible.