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:
WebKit thinks they are doing things correctly and that Chrome and Firefox are buggy. So I've reported to them instead:
I can't reproduce this issue any more. I'm not sure what I was initially doing different.