Tell your allies to move to the side?
But, yeah, the extent to which these tricks work depend to a great extent on the DM: both how they interpret/apply the rules, and how intelligently they play their monsters. But the same is true when it comes to melee: a DM that wants to frustrate melee PCs can do so easily.
On that note, I will add is that Baldur's Gate III has been an interesting laboratory for thinking about these things. For the most part the BGIII engine plays enemies quite intelligently and deviously. I have found that I often struggle to use my melee characters as effectively as white room analysis would predict...e.g. the cleave benefit of Great Weapon Master turns out to be very hard to use effectively...but my ranged characters (especially the rogue) are especially effective. (And same for enemies in reverse: ranged enemies tend to be more challenging than melee ones.) I keep wanting to use the rogue in melee...especially since he acquires magic short sword/dagger much sooner than a magic bow...but the ranged attack is the better choice almost all the time.
It is not just my allies. It is walls, it is enemies closing with me (which I could use it but then I would be at a straight roll, not with advantage and with no sneak attack and have to stay in melee). It is winning initiative when your party tank is behind you and goes last. It is the wizard telling ME to move so he can let loose with fear or fireball.
Then when you finally have a turn you don't need to move it is the opportunity cost for all the other things you can do with your bonus: Depending on subclass - Mage Hand Legerdemain, Fast Hands, a bonus action spell or hide.
These kinds of things together mean in the games I play and DM, Rogues are not using steady aim
most turns.
To be honest I find melee characters making ranged attacks often and ranged characters in melee often.
In the white room you get the people talking about PAM, Sentinel and GWM. In may look good in terms of numbers, but that is a crapton of ASIs you are giving up and while you will have these lofty numbers it ends up being an extremely weak character in play, even in combat. You do get amazing damage every now and again but you do substantially less damage when you have to throw something or trying to prevent a grapple. You don't have any good magic weapons because the chance of finding a magic Glaive or Halberd is low, so by tier 3 either you are doing half damage or you are using your backup magic mace your party found while sporting your 16 strength.
I love BG3 but I have found the enemies to be exactly the opposite - exceedingly stupid enemies. Pretty much all you need to do is start shooting them from range and set up a mini ambush for them and they come to you. Even when you are fighting ranged enemies, they never pop in and out of cover, they just stand there and shoot you.
Get up on high ground. Instead of hiding melee enemies will run from across the battlefield taking 3 turns to get to you and then climb a ladder and get you in melee ….. and when (if) they get to the top you can push them off.
.