You can absolutely remove the D&D Fantasy from D&D. Sure, D&D works best (and easiest) as D&D Fantasy, but it isn't mandatory.
In my view, D&D fantasy includes all (or at least most) of the following tropes:
1. Adventurers and Adventuring parties. A mixed band of complementary characters pulled from the classic races and classes. You have humans, elves, dwarves, halflings and so on. You have fighters, mages, clerics, thieves and the rest of the core classes. "Adventurer" is a well-known and accepted profession in the world.
2. Clerics. Not just priests, but D&D clerics capable of divine spellcasting, turning the undead and healing. Often wielding blunt weapons and wearing chainmail.
3. Quest Structure. A campaign centered around a series of individual quests or modules or one-long campaign arc. Quest givers and "do this thing for gold" offers are prevalent motivators. Powerful people have no qualms about hiring dangerous strangers to do vitally important tasks for them.
4. Wandering Heroes. PCs tend to be wanderers with little connection to the world around them. Many take a cavalier attitude towards the fate of others or engage in murderhoboism. Backstories and personal connections are often rudimentary at best, though the recent trend is towards incorporating more of this (ala Critical Role or other story-forward games).
5. Zero to Hero Advancement. Characters start at low-power and, if successful, advance to become powerful beings. Advancement comes from defeating ever more powerful monsters and finding larger and larger treasure hordes.
6. A quasi-medieval world. Kingdoms and fortresses and the trappings of the middle ages. But not slavish historical gaming. The intricacies of feudalism is not examined in any detail. Moving the game out of this time-period (to Modern, Scifi, Enlightenment, Post-apocalyptic or whatever) goes a long way to taking i
7. The presence of well-known classic monsters: skeletons, goblins, orcs, ogres, carrion crawlers, ghouls, gelatinous cubes, mimics, regenerating trolls and, of course, dragons. D&D Fantasy posits a world in which the whole of the Monster Manual exists.
8. Vancian-ish spellcasting. A divide between arcane, divine (and primal) magic. Magic a tool to overcome challenges. It is not particularly mysterious or dangerous to wield. Ironically, true Vancian spellcasting (ala Dying Earth) moves away from D&D Fantasy.
9. The acquisition of increasingly powerful magic items throughout the campaign. Also, the inclusion of classic D&D magic items: bags of holding, gauntlets of ogre might, and so on.
10. The presence of dungeons. A plethora of improbable underground structured filled with monsters, traps and treasures. The more valuable the treasure, the more dangerous the monsters and the traps.