Arduino MKR ZERO blink sketch only works when uploaded from online editor

Both CREATE and IDE 1.8.5 work from here under win 7 x64 pro and the standard blink example and blink without delay.

Current core here is 1.6.19 for SAMD.

That makes me think it may be an issue local to your computer in some form.

Have you made any changes to the IDE in any way ?

Ensure a USB 2.0 port is being used and try other USB cables.

Turn off any antivirus or additional security software to test the desktop IDE.