Thanks for the super detailed investigation @FerrariFlunker!
I’ve just made a PR for a fix in Discourse core:
The reason it was fixed after removing the chat plugin is that Chat makes heavy use of this ‘PresenceChannel’ API, and so the issue is far more likely to happen. I don’t think any changes will be required in chat.