Flanking requires two people on both sides of a enemy, this is pretty average (optional) mechanic on multiple editions of d&d.
Sorry, I just didn't feel like going through the whole history of flanking to discuss my opinion on flanking in BG3 or 5e.
For a rogue to get sneak attack requires advantage; push, disengage, and what not will get you out of it. Flanking also requires you to be near the target, archers and spellcasters are not going to be near a target, along with the party only being four total.
The rogue can also get sneak attack if an ally is within 5 feet of the enemy

I'd take this any day over leap frog backstab. Example: when surrounded by a horde of goblins, you should be at a disadvantage or they should have a advantage.
I've never been fond of 5e's interpretation of flanking. It has the same issue as backstab granting advantage, with less frequency.