Well, in answer to your question do my underwear work for you?
Firearms are as personal as underwear. What works for me might not work for you. Starting at the beginning, I don't have my red dot mounted on the rail but on a mount that allows me to still fold the gun. So that's as far as I can go since it's a fixed position. It might be 12" from my eye and that works fine.
But on other straight line recoil firearms, assuming the sight is set up correctly for ones head shape, I like to keep it away from the ejection port, moving oily parts, or near the muzzle. All of those can lead to issues. I like it far enough away from my eye to give me peripheral vision. Too close limits what I see to the sides. Phooey on limiting that data that I need to figure out the shooting solution to other targets! But with a red dot it just doesn't matter where it's put, again assuming it's set up properly. By that I mean high enough that when shouldered, properly seated in the shoulder pocket for recoil control, the eye is looking through the sight immediately, no contortions to get it to work. Then decide close or distant. It's an aim point and not a telescope, maybe experience comes into play, IDK. But once in place it's not permanent, it can be moved on the rail if that's what you choose. Move it around and see what works for you. If I need to contort my neck with the butt seated properly in the shoulder pocket I do what I need to do to make it right and I don't care what anyone else thinks. That goes for near or far from the eye too.