I too am noticing similar issues with text expansions inserting incorrectly, in my case when using TextExpander on Mac. I can’t tell for certain, but it seems to happen mostly (or perhaps entirely) in Live Preview mode rather than in Source Mode.
Snippets that include spaces or insertion after a cursor repositioning sometimes insert in the wrong location. It happens only inside Obsidian, so I think it’s somehow related to the interaction between Obsidian & whatever text expansion apps we all happen to be using.