In D&D 5e, moving within reach of an opponent does not provoke any attacks of opportunity unless you leave the opponents reach. Ranged attacks have disadvantage if you're next to an opponent.
Quixotically, this might suggests that it's actually a downside to have reach when it comes to defending against ranged attackers. After all, a ranged attacker next to an opponent with normal reach can't avoid the disadvantage by just stepping away without provoking an attack of opportunity. However, a ranged attacker can move away from a creature with reach as long as it stays within that reach; and if that ranged attacker is then non-adjacent, it doesn't sound like it has disadvantage.
This sounds a little weird to me, hence the question: Are ranged attacks within melee reach of an opponent disadvantaged if non-adjacent? If so, is this the rules intent?