In this scenario D&D just came out, so in context it's not a niche definition, it's one author in England using a word incorrectly.
Tolkien wasn't using the word "race" wrong, people now just focus far too narrowly on one or two specific definitions of "race" that are obsolete.
Except there are dictionary definitions of the term "race" that would apply to D&D character races.
A quick search at dictionary.com shows the following definitions for "race" as a noun that could apply to a D&D character race:
Definitions for "race"
"any people united by common history, language, cultural traits, etc."
"a group of tribes or peoples forming an ethnic lineage"
"a socially constructed category of identification based on physical characteristics, ancestry, historical affiliation, or shared culture"
Any of which could plausibly describe D&D elves, dwarves, halflings, gnomes, etc. as distinct from humans.
. . .and the caveat in the dictionary that some of the definitions of race can be seen as obsolete by the idea that there's no biological distinction between human races goes right out the window when there's the vast objective physical differences in D&D character races (such as general lack of interfertility between character races, wildly different lifespans, and the fact that some are objectively stronger or more agile than others by the fact they have stat modifiers). Trying to pretend that the fact that "race" with regards to human beings is a subjective social construct, while D&D character races have vastly more differences among them than humans do and they include objective physical distinctions is focusing entirely on a single, specific definition of the term and ignoring the rest of them.