I’ve always had the same problem with Anki for Windows:
I’ve never found a solution; I just got used to it, but yes, it’s a little bit annoying.
EDIT: Maybe it’s a non sense, but I’ve been using Enter instead of the Space bar for some minutes and the problem didn’t appear. I don’t have time to do a proper test today, but maybe you can try it and see if it works for you, that could be a clue for a possible fix