The dragon is just a more extreme example, but the problem is the system itself which depends more on environmental effects than actual D&D combat. You might fix it for the dragon, but then players will just do this cheese to something else. The problems are the barrels, the falling objects, the puddles, etc.
There would be plenty of ways to fix the opening for these exploits AND keep the systemic rules consistent in context IF Larian cared one bit about doing so.
For instance one eye to "realism" would suggest that no one should be able to move and throw around full barrels that should weight several quintals each as if they were paper holders. And for sure no one should be able to carry several in a backpack.
So they could have their "fun" explosive barrels placed in specific places, without the exploit deriving from amassing large quantities of these. AND make the setting more believable/consistent in the process. Killing two birds with a stone, as they say.
The problem is, I'm afraid, that on the contrary they seem to be rather fond of their "cheese" and perceive it as some endearing selling point that doesn't need to be addressed to any extent.