darkvision should be 60 foot (18m) (at least in 5E) which is somewhat less than the normal range of a shortbow ...that said, I think it is perfectly legit to lose your advantage if you can't see far enough. How can you pick out an accurate spot to strike if you can't really see it? That's when you would create a light source near the target e.g. dancing lights (well that should work!). There is also superior dark vision - both a spell and a natural ability for some creatures, which extends your range to 120 ft...so those creatures/npcs should gain benefit from that over a run-of-the-mill dark vision. I think there are other issues with sneak attack though - it definitely does not always work when your rogue is attacking a creature with allies right next to it. They need to fix this, sneak attack is the rogues bread and butter, at least from a combat perspective (which seems to be all people really care about). I actually preferred 3E/Pathfinder rule where you could only sneak attack with a ranged weapon within 30 foot. That seemed sensible - you had to be close enough to really see what was going on.
Ranges of missile weapons are not properly implemented thus far (all are set at 18m). This seriously needs to get fixed for us that play Drow thieves (120ft" superior dark-vision = 36.5m vision range) for ranged attacks with longbows (yes, I spec'd for it).
5e Shortbow short range: 80ft/24.3m (long 320ft/97.5m) No penalty for short range of up to 80ft so we dark elves should be able to "sneak attack" out to that range without a range penalty.
5e Longbow short range is: 150ft/36.5m (long 600ft/182.88m) ... so short "normal" range is more than my Drow 120ft superior dark vision...so anything under that should be considered as "advantage" against target if they don't know where my character is in the dark.
This is just an extreme example on how range weapons are are not calculated correctly in game, and that sadly affects our "sneak attack" as a consequence. Fix the range issues ... for weapons and dark vision to be accurate and that will eliminate range from affecting our "sneak attacks". It won't help other issues such as elevation issues, as one can't seem to sneak attack someone higher than yourself, which makes zero sense when you think about it. As I should be able to sneak attack that goblin on the roof if they cannot see me, or the duagar on the ledge, etc..