Oof, that’s a different bug, because I just patched the earlier type of issue with an emoji insert right after punctuation (FIX: emojis should insert right after punctuation correctly by tyb-talks · Pull Request #35830 · discourse/discourse · GitHub) which is not yet deployed here to Meta.
Similarly, this has been there for a while, and I can confirm it’s only happening in chat. Will park some time for this too.