I realize that a lot of people play D&D without much if any dungeon exploration, so bear with me.
Many of the rules of D&D, including 5E, are artifacts of the dungeon exploration mode of play. The thing is, very little fantasy beyond D&D (and those things directly inspired by it) does dungeon exploration. Even the original inspirations for the dungeon were much less onerous than actual dungeon exploration. Vast Moria was basically a 5 room dungeon connected by a few skill challenges.
So, what does D&D look like if you presume that you will be emulating not dungeon crawls but Game of Thrones and The Wheel of Time or Lord of the Rings? What mechanical elements, specifically, need to change, be removed or added to make D&D a general fantasy RPG rather than a genre unto itself? And can you do that and still have the game*be* D&D.
A quick note: "Play another game" is not a helpful response. Nor am I asking you for advice on how I can make my game like this. I am just starting a conversation. We're just brainstorming for fun.
I think earlier pre-3E, 3E, 4E, and 5E all faced different challenges and had different solutions here, which means you putting this as a "general" thread makes it a little trickier to respond to. I'll be very brief on the ones before 5E.
Pre-3E was just a huge mess re: non-dungeon-crawls. The biggest problem though was levels and the lack of a real skill system, which individual groups or particular sub-editions or books sometimes had workarounds for, but proficiencies didn't cut it. You could absolutely run something more GoT or LotR or Assassin Trilogy-ish, but it wouldn't work very well.
3E made the problem worse by trying to fix it. Levels became even more important, and the heavy, fiddly skill system, combined with "can't do it unless you have this"-type Feats and prescriptive approach to rules for doing pretty much anything and thus it was even worse at non-dungeon-type fantasy than previous editions (though heavily modifying stuff could create d20-based games which were okay at it, but those aren't D&D). Class imbalances also made the problem really bad.
4E could handle GoT/LotR-type stuff better than any previous system, but with two caveats. First off, you had to scale encounters appropriately (which some people just hated), and second off, you had to throw what were, by the rules, extremely challenging encounters at the PCs if they were only 1/day or whatever. But the more free-form skill system, skill challenges, less prescriptive approach to rules/Feat design, and so on definitely improved things.
5E could have done even better, but deciding to tightly balance resource usage and availability, especially around a putative 6-8 encounters/day, as well as failing to mitigate (or even to really allow players to mitigate) the volatility of d20-based binary skill checks. They also gave most non-caster classes far too little power outside of the combat pillar.
Running through all of them there's an additional problem. Utility magic. Killing magic isn't really a big issue, because it doesn't really matter so much how enemies end up dead, so long as the need to be engaged essentially face-to-face, and about 98% of D&D spells do require that (even Fireball essentially does - it's not that different to throwing a grenade or something). But the sheer amount of utility magic D&D characters can put out is huge, and it can allow you trivialize a very large number of encounters that might be challenging in other fantasy. 5E has attempted to clamp down on this a bit, but it also hands out an awful lot of it. This is a big part of why D&D is almost it's own genre, the utility magic.
Even a lower-level Sorcerer (for example) can have an array of cantrips and low-level spells that make him almost like some sort of profound magical being. Higher-level casters have much more in common with the genie from Aladdin than, say, Gandalf.
So to allow 5E D&D to really do other genres, you'd need to pare back on the resources available per day somehow, or re-balance expectations so that more resource expenditure was required, give more characters more reliable ways to deal with skill-based situations (which might entail some entirely new narrative mechanic and resource), and take a hard look at utility magic. I think you'd probably want to fundamentally replace the magic system. Levels are less of a problem in 5E than previous editions, at least.