It's a bug. A lot of the characters do that. Say you start typing a word, and before you finish, the word appears in the suggested word line. so you hit that word, it puts the word in your text and automatically adds a space. Now suppose that is the last word in the sentence so you hit a period. Initially the period shows up with a space after the word and then the software moves the period to the left next to the word, as it should. The bug is that the software does that for just about all the characters, when it should only do it for periods, commas, colons and semi-colons and the like.
Hope some day they will fix it. A workaround may be to put two spaces, then the Dollar sign. But doing so will automatically put a period after the last word you typed. Can't win.