Got it working by deleting the link then retyping on the iPhone. I suspect the issue is in the sync with iCloud notes, because the links I added there are the ones that don't work on the iPhone and vice versa. Links added to notes on the iphone don't work in the iCloud version. Weird.
Thanks to everyone for helping me troubleshoot this.