Well speaking in rl terms, height does play a factor in it. Specially when using bows, as you are doing in BG3. When it comes to firearms not so much. With bows your able to shoot further without the need of aiming to correct for arrow drop vs. distance to target. Then there is the way the person lower then you has to aim to hit you, Also if you have some form of cover while on the high ground, again it affects how the lower archer will have to aim in order to hit you. If your higher you can negate alot of cover do to them being more exposed then they would be if you were on level ground. All this said yes height does have a real life affect when it comes to shooting a good deal in archery, but even when using guns it has an affect on how you aim, if cover is going to be effective, and how much it's going to effect the shooter.
NOW this 'advantage' is actually the opposite when it comes to melee, being lower then your opponent forces the 'higher' person to guard their legs, harder to do with shorter weapons. While you can easily hold a shield over your head, and even ruin the angles they block almost entirely. This can easily allow you to go ape on their ankles, shins, feet, knees etc. while they are forced to protect those harder to protect areas. Again with the 'lower' person using a shield the can negate the defense by simply putting their shield between the 'higher' persons torso and legs.
There isn't a 'rule' that I can find in 5e that states that high ground gives advantage, though depending on the dm they house rule it or not. Which is true for most of the 'rules' in D&D, since even in books it states the rules are more guidelines hence my use of ' '. This in the end comes down to wether it makes sense or no?, does it fit the layout of the land? would the creatures be smart enough to use this to their advantage?
Example 1. The archer at the top of the hill in the druids grove vs. you going to the top of the hill in the druids grove. Both cases make sense, as does the Teiflings being atop the ramparts, and gates. The part in this and there are a couple is.
a. Teif raising the gate being shot. Uh hold on a fucking moment. (I also might be incorrect please correct me.) he is standing protected by the horizontal part of the wench, the rope, and the top of the wall??? WTF sniper goblins?? This doesn't make sense in the fact how does a goblin (even the one on top of the wall) manage to aim so well to strike this person who is almost completely blocked from sight. Sure makes great cinematic if you don't factor in all the cover he has. Most rp'ers strat gamers will take this into account though. Now there are at least 2 goblins that climb atop 'high' ground in that fight, and to this I call bullshit. There needs to be a usage of climb, or a severe reduction of their movement to get up there. (ugg fingers don't fucking want to spell there but instead their sorry) For in a fight you'd not be trying to climb one or 2 sheer spots. which these 2 spots are at least visually appear to be. Indeed why in all the hells is that archer so out of position as to be in front of the tanks!!
b. The goblins in the village atop the houses. In a way it makes sense for some of them to be up there. Look outs, snipers etc. Yet in this case it is overdone. With all of them at the front being up their and one being still higher up do to 'smith??' house being higher then the road it's kinda makes you wonder why all of them are up there. Still I can kinda see this, though on the other hand it would make sense for a couple of this group to also be on the ground. or the group in back to have a presence in front. Yet this falls to pieces when you take note of the goblins stationed as guards on all the other gates. None of them using the high ground to keep a watch, nor do they respond to any alert from the first group. Fuck those deaf assholes, probably sleeping on the damn job. I say kill them.
c. Goblin camp main building. For the love of all thats fucking holy why are there rafter hoppers!! Seriously what sense does it make to have 8 or so goblins (not sure as to exact count) hanging around on crossbeams? Sure looks cool, makes them feel great being up high. Yet heres the thing their feet can't be positioned enough to use their bows effectively, so using those bows would be ineffective canceling out the 'advantage' of their higher position. Now we figure in their height roughly 3 ft or so, their intelligence (sorry not a number) and they'd probably forget they were up there and fall. or get so excited on seeing something to kill they'd chaaaaaaarge right to their deaths. Again height just for advantage sake is poor form. Move those fools to the ground.
blah me and my damn wordy posts... anyway my thoughts