Arduino only works when connected to USB

Does the green power led light when you power the MKR Zero using Vin and ground instead of either the USB cable or a battery?
What happens if you disconnect the auxiliary circuit you've added and make a direct connection between the power jack, powered at 5v, and Vin/ground again without the USB cable being connected. Do you get the expected measurements on pins 9, 10 and 11 ?

I've reproduced the circuit on a breadboard and it works. Maybe I wired something wrong or short circuited somewhere?

If you have now solved the problem by a rebuild, then mark it as solved so no one else spends too much time looking at it.
A short circuit with a 2 amp power supply would be difficult to ignore since this would usually be accompanied by heat and smoke. More plausible would be a polarity reversal on the jack plug combined with a user failure to notice the '-' sign when measuring the voltage. Fortunately the MKR Zero is well protected against abuse.

If not a short and not the reversed power supply, then what could it be? My old circuit still doesn't work.

Using your old circuit, if (a) the Arduino's green power light is on and (b) you are running the sketch in post #1 and (c) you are powering the Arduino via Vin only and (d) you get unexpected results on pins 9, 10 and 11, which appears to be how you are determining if it works, then that is certainly worth investigating. Is that what you see with your old circuit?

Yes correct.