Sales numbers are in some cases also associated with the before mentioned brand recognition/loyalty. I myself bought games like NWN2, DA2, Diabloe 3 and likely more due to the games that came before. Even if it was a dissapointment and I had them uninstalled, I did buy them and added to the numbers, no matter how good or bad the game was.

I think the DND experience came a lot sooner than NWN2, NWN2 was trying to ride the popularity train. Neverwinter Nights 1 was supposed to be the sequel to the BG series (I think there were old tooltips in the originals that talked about exporting your character to NWN before stuff was established to not work like that. In the BG games, especially 1, there is even foreshadowing that Amn and Neverwinter would be settings).

As to why there has not been a big breakout game for the DND ruleset? Likely because no game studio made an actual good game for it. It is like many other things in the world too, a possibly great premise for something but lousy execution. Some of the sony Spiderman films are considered this, with reboots/different attempts. The DC cinematic universe is like this according to some. The Fantastic Four movies. Many videogame to movie adaptations and other way around. Avatar the Last Airbender movie (I apologize for ATLA fans for bringing this up).

DnD for a while was also not as popular as videogames itself I figure, with the era of 4th edition being considered a flop according to many DND players not helping. So many factors why there was not a breakout game for it, but it is definatly more complicated than just looking at sales numbers in a vaccuum without context. Especially with DnD being on the rise and becoming more and more popular as a tabletop RPG. (In part likely also due to DnD streams popping up more and more)