Arduino Zero disappears occasionally

I've now seen this with all kinds of different sketches. My current remedy is to mash the reset button a few times, cross my fingers, then upload an empty sketch. Sometimes this gets things working. However, certain sketches I have not be able to connect the Serial monitor to.

When this reset approach does work, the board changes ports making it difficult to use the IDE.

Another example sketch I'm unable to get working: Adafruit_ZeroTimer/timers_callback.ino at master · adafruit/Adafruit_ZeroTimer · GitHub

I was able to upload it after some difficulty, but nothing comes out of the Serial monitor, and eventually it reverts to a bad state requiring the above reset procedure.

After looking around this seems to be a common problem. Is the underlying cause known? I'm considering returning my MKRZERO as it is essentially unusable for me :-/