The problem with earlier versions of D&D is simple math: a level 20 warrior will get a whooping +20 to their attack. And you dont have any ability to gain +20 to your armor class; not even close. Thus warriors will effectively ignore your armor class and hit you all the time.
The reason I mentioned BG2 and KotOR is that I have played both games to the death and know them very well. The problem also appears in all other D&D games I've played in the past, provided they would progress to higher levels.
In D&D5 you can now only gain +2 at level 1 to your attack, in BG3 culminating to +4 at level 9, and in the original system to +6 at level 17. So your total gain will only be +4.
The real progression is of course different, because thanks to other mechanisms you can gain attack bonus from other sources - feats, gear, and in BG3 especially strength elixiers. And in BG3 specifically the broken feat Tavern Brawler completely breaks the logic into pieces. But opponents never use such broken mechanics.
The other reason why D&D5 is to my mind a huge improvement over previous versions is that many more spells than traditionally use attack rolls, even for spells. Thats why spellcasters have to focus on getting higher attacks, too, though I dont know of any feat that would help and theres no Tavern Brawler for them, theres only items.
BG3 has a multitude of ways how to get better attack on opponents. You can blind them, you can make them fall prone, you can stun them, etc.
And in this case, spellcasters will also benefit from these conditions for their spell attacks.
The thread also already mentioned that there is extra attack for many classes, even two pure spellcaster classes - Warlock and, if they dont pick the subclass Lore, Bards. Additionally one can use dualweapons and many classes can even get the same damage bonus from strength or dexterity on the offhand as in the main hand:
https://bg3.wiki/wiki/Fighting_style (namely "Two-Weapon Fighting").
This is an advantage that no spellcaster can have. So much so that it is a simple trick to as a rule give spellcasters two Hand Crossbows for a ranged weapon just so they can always use their bonus action for an offhand attack with their second crossbow. This is even true if they have no proficiency for Hand Crossbow.
It should also be mentioned that in order to even get the proficiency bonus for weapon attacks, you need actual proficiency in the weapon. Thats what keeps many classes back. Also a Bard for example has no reason to actually use anything but Finesse weapons, because nothing in their class suggests that they should aim for high strength.
I love D&D3 for many reasons and dont think that D&D5 is any perfect, but overall D&D5 is the more elegant design that, despite being more simple, makes playing the game more varied and interesting.
By the way if you want great attacks from level 1 on on a warrior, simply pick Barbarian. Their Reckless Attack allows to gain advantage on attack rolls right out of the box. BG3 even prompts you if you want to use Reckless Attack if your attack has failed. And rage always gives resistance to physical damage as well, too, so even if opponents hit you they hit you only for half their usual damage.
In BG3 specifically thanks to the Tavern Brawler feat there is a way to gain bonus to attack as it was in earlier versions of D&D: play as Open Hand Monk, pick the Tavern Brawler feat, and get your hands on a Cloud Giant Elixier. Your strength bonus will be +8 with the elixier and with unarmed attacks, which are the default for Open Hand Monk, as well as improvised weapons and thrown weapons your attack bonus will be +16; same for the damage bonus, effectively ignoring all armor opponents realistically have.
P.s.: Correction: You get Reckless Attack as Barbarian 2, not on first level.