Update. I've got something working. It is indeed littering the area with entities. Except doing so as a binary search.
So it first creates a bunch of 32x32 entities. And on the one that is then selected the next tick it creates 4 16x16 entities, tick later 8x8. All the way down to 1x1.
That means there is a 5 tick delay in getting the position. (I'll make it a bit smarter that the positions around the last known position have smaller subdivisions.)
It's quite ugly to implement, I'm still ironing some things out.
Main thing I'm worried about is that the final 1x1 entity shouldn't be destroyed, and should stay selectable. That gives an ugly red selection box around it, and some gui info on the right. Not sure if I can remove those.
Is that an issue?
If I do destroy it, the mouse is lost again and to detect movement it would have to find it every 5 ticks. Which is a performance issue.
https://i.imgur.com/9Ui50G8.png