Tested with Safari 13 on macOS 14. Chrome and Firefox do not have this behaviour.
Not sure who is in the right here. Apparently AltGr+space for non-breaking space is used in Linux in some cases as well. Reporting to WebKit for now: https://bugs.webkit.org/show_bug.cgi?id=203730
WebKit thinks they are doing things correctly and that Chrome and Firefox are buggy. So I've reported to them instead: https://bugzilla.mozilla.org/show_bug.cgi?id=1593633 https://bugs.chromium.org/p/chromium/issues/detail?id=1021006
I can't reproduce this issue any more. I'm not sure what I was initially doing different. Closing.