Booloader USB Issues after debugging with ATMEL-ICE

I am using an Arduino Nano 33 IOT with ATMEL-ICE using SWD. I am able to upload my program with pio debug, set breakpoints and run/debug the program. However, after uploading my program this way, the USB port disappears from the device manager and Windows complains that it does not recognize the usb device. The only way I can fix this issue is to go back to the Arduino IDE and burn the bootloader (again with ATMEL-ICE). I am then able to upload and run my program from the Arduino IDE.
It appears that PlatformIO messes up the bootloader after uploading the program from debugging.
Han anyone else had this issue? Is there a way to get around this?

Please file an issue here Issues · platformio/platform-atmelsam · GitHub

1 Like