Enemies have movement they can spend before attacking. 1 square is not enough to keep them from attack you this turn. So your assumption isn't about being more than 1 square away, it's about all ranged PC's being more squares away than their movement distance when it's their turn. That's a big assumption.
This is no different than saying it works when it works or doesn't work when it doesn't work...
It's about outgoing damage versus incoming damage. The difference between X (outgoing) and zero will almost always be better than the difference between X and Y (incoming).
...and it is different because that particular setup is based upon a set of conditions and assumptions which I did not set. Ranged attacks have a lot of advantages in 5E (as they also do in a real fight) but without many downsides. That's true regardless of specific situations. Ranged attacks are a strong combat multiplier in D&D.
What changes depending on the situation is how to best employ the strengths of the PC party (as a collective combat unit).
Hypothetically, in the situation given where a tank is taking a lot of attacks -and the party expects that- it makes sense that the PC filling the role of tank would invest resources in being difficult to hit. (Sidenote: It's not difficult to build a PC who is, even at low levels, virtually impossible to hit.)
If the party as a collective unit isn't very capable of using that tactic, it's reasonable to think the party would approach employing their strengths differently. For example, back in 4E, a party which doubled up on a combat role at the expense of something would fight differently. In 5E, that remains true -in a system with less powers to create movement.
The strengths remain the same. It's the approach to employing them which changes. Ideally, the best scenario is one in which you accentuate your strengths while mitigating the enemy's ability to use theirs.
I know that a lot of people think in terms of individual PCs. I don't. I look at things from the perspective of how the pieces of the party as a whole -as a collective unit- can engage with the enemy.
To get back on topic....
I think defensive style is great to build the upfront tank. You could combine that with a race which gets a natural AC bonus to already be at +2 before equipment. Heck, maybe even go straight Dex after that so you can be good at ranged attacks until the enemy gets close and still have a high AC. In melee, switch over to a shield and a finesse weapon.
Behind that can be archery style PCs and casters.
Are there situations where that might not work 100%? Probably, but that's true of virtually anything, so I don't see that as a particularly strong argument against it.
(Edit to fix spelling mistakes)