Oh I've seen other modders talk about this sort of dragging problem before. Afaik there isn't a fix in the current version of Factorio, so I'll just have to add this to known issues for now. Something something player position isn't updated until dragging stops.
I'll be sure to fix the issue once the API is updated to allow fixing this. Sorry about that.