There are a few factors to consider...
The beam is going to ONLY be visible if it hits something that then reflects light to your eyes....say water vapor or dust particle, etc.
So, the more stuff in the air to hit, the brighter the beam will be able to appear to an observer.
The other is the resolution of your eye as range increases. When you look at say a railroad track receding into the distance, it APPEARS that the tracks get closer and closer together as the distance from you increases.
At some point, you will lose the ability to see two tracks, and see only one line. This is because the farther away something is, the smaller the percentage of it is in your field of view...and the less resolution you have.
How far away from you would you be ABLE to see something that was small, perhaps a few inches across?
Is there a distance that you might be able to make out a turkey buzzard but not a hummingbird?
The dowel shaped laser beam is a small target to resolve, and, at longer ranges, will be such a small percentage of your field of view, that you will no longer be able to see it.
Just like RR tacks "converge than disappear into the distance" so will your beam.
Add to that that the stuff in the air is gradually reducing as you enter the upper atmosphere, so there's less beam visibility...and now its like those RR tracks are not only really far away, but being painted a non-contrasting color to boot.
So, at some point, the beam will simply be to hard to see from where its emitted from.
At the RECEIVING end, the opposite is happening...the tracks are getting CLOSER, and easier to resolve. Now, in space, I don't know how much stuff is floating around to reflect the light to your eyes/camera, etc...but, by the time the beam is in space, its fatter, and, closer at least.