I mean, that's a valid perspective, but I don't think it's one that comports well with how D&D is actually played, nor how it's treated by the designers over the editions. In every edition we've seen designers treat classes as both specific fiction and just as mechanical. We've also seen how inconsistent and double-standard-having it can be, where martial classes are frequently treated as "just mechanics", not representing anything in the fiction really, but magic-using classes are vastly more likely to be treated as diegetic. Even that's not consistent though - classes are often used "representationally" through every edition of D&D. 2E's Kits provide a lot of examples of this, in fact, I'd say, often putting the fiction of the kit first in place of any fiction associated with the class (sometimes directly contradicting the fiction of the class - we see this less with subclasses in 5E, but I would say not never). In 2E sometimes a Mage is actually a Mage who in-setting people know is that, but sometimes it's merely a representational block for a primarily-arcane spellcaster. Thinking about it diegetic or not is also not a binary but rather a sliding scale - I remember noticing this first with a 2E "Heroes of Faerun" or something similar book - there were a lot of book characters who had classes which well, clearly were just used to give them specific abilities, even though their backstory really didn't match well with that. Or other characters who had backstories which were tight matches for certain classes - they then didn't have! Back then, as I was a teenager, it just made me kind of mad and confused lol.
(The inconsistency is heightened the narrower a class is - Speciality Priest is almost always fully diegetic, but Cleric? Not so much. Paladin? Pretty much definitely diegetic. Ranger? Often just a power block, indeed whilst I won't get into a fight on this with anyone, I'd strongly suggest Drizzt is a pretty superb example of Ranger being used almost entirely as a power block - the man is a Fighter who owns a specific magic item and fights two-weapon-style, something only Rangers were good at (IIRC) in 1E when writing started on his books.)
Anyway, I understand your position I think!