MKR not recognized by PC USB port after upload of sketch

Have you tried quickly double pressing the RESET button to put it into BOOTLOADER mode on a new COM port.

If you can get that far I normally suggest pushing the BLINK or MINMUM example up to the board to clear out the old sketch and returning it to its normal COM port.

Timing can be a little critical but once you get the hang of it then its second nature with errant sketches.

Also a copy of the sketch may be useful but please use CODE TAGS to post it ( </> )