But it won’t totaly remove the effect. I would suggest to use a texture for the line with fully transparent alpha on the outside and fully opaque inside. With some gradient in the alpha & mipmaps, I think it can decrease the aliasing effect.
I can’t see a way to fix that… It is because of the anti-aliasing algorithm which is dimming the line when it is a single pixel because it averages with other darker pixels. You could disable the anti-aliasing, but it would be worst because the line would sometimes completely disappear…
One thing you could do is detecting that the line is only one or two pixels height and draw a line instead of the box.
With your sampling idea I found an alternative more cheaper solution. Increase the transparency when it is further away. This will blur it more and make the line thiner and it will become more visible when coming towards your. It is not perfect but a bit better.