This is a fairly interesting question... honestly, "What is D&D?" carries as much philosophical weight as the Ship of Theseus.
I've tackled this before, but I view this in the following terms-
1. Core D&D. The OD&D/1e/2e/3e/4e/5e and BX/BECMI/RC line of games. Or, put another way, D&D are the games designated as such by the D&D rights holder.
That's the inner core of the "D&D Circle." It's pretty inarguable. D&D is what the holder of the D&D rights says it is.
2. But I don't think that this is quite expansive enough. D&D isn't just "official" D&D, because D&D in terms of usage encompasses a whole style of play and rules. I think it's easier to start with the rules- there is an entire universe of games that emulate D&D because they are clones of the rules. Maybe they have a tweak here or there, but these games, everything from OSE to OSRIC to so much more (retroclones) are, in fact, D&D. Any game that seeks to emulate and/or clone the rules in whole or in part to simulate a version of D&D is D&D. Which includes Pathfinder. And A5E (Level Up).
3. But wait, there's more! Following are some edge cases that I define as "not D&D" but could also be defined as "D&D."
A. What if it isn't fantasy? There were a number of d20 games that are not fantasy. The D&D rules in different editions have been adopted for use in different non-fantasy campaigns. There is noting wrong with playing a non-fantasy campaign, and there is nothing wrong with using "D&D rules" for something that isn't fantasy. However, by using the term "D&D," (which, before we forget, means Dungeons & Dragons) you are necessarily invoking fantasy. As such, while you can look at the amount of "fantasy" necessary, I do not think you can use "D&D" to refer to, for example, a purely modern or science fiction campaign.
B. What if it's based on a clone, but not based on D&D? This is the "PF2" exception. PF can be called D&D; but PF2 was developed independently, with new rules, as an evolution of PF. So PF2 is not D&D, even though PF is. Probably.
C. What if it's not designed to emulate the rules, but the "feel" of D&D? If a game is using a completely different underlying engine (PbTA, BiTD), but is looking to emulate the feel of a classic fantasy dungeon game (aka, D&D) ... it's not D&D. It might be a great game, but unless it is trying to emulate the rules of one of the D&D games, it isn't "D&D." That's the Dungeon World example.
But but ... D&D is also an almost generic term for TTRPGs for people that aren't in the hobby. So for many people, D&D is simply all TTRPGs.
I guess D&D is like art- we know it when we see it. But to me, it's interesting that I feel that the rules matter more than the intent (so that retroclones, even ones that have substantial changes, are D&D ... while a game that uses completely different rules to try to get the actual gestalt of D&D, like Dungeon World, isn't). On the other hand, rules matter less than feel when it comes to genre, so a game that isn't fantasy (d20 games set in science fiction genres) doesn't feel like D&D, even if it is using the D&D rules.
For me, D&D (and "D&D variants") is a game in the fantasy genre (either swords & sorcery / gritty like OD&D/1e or high fantasy like later versions) that has some linkage to the D&D ruleset.
YMMV.