MKR GSM 1400 Works only when connected to computer
If your sketch on an Arduino with native USB doesn't run if not connected to USB, always first check if you didn't forget the while (!Serial) {} in setup().