I think the issue you encountered is when the line and the dot is the same color
Quite possibly
I'd try to go hardcore-algorithmic mode and try to put dots in such places, so that no matter how player connects them, there are no dots lying on the lines, so the problem would not even exist.