I'm curious if the works of R.A. Salvatore and the like are considered canon source material for D&D campaign games. Or if they are treated more like fanfictions.
They most likely are, but Salvatore contradicts or omits several lore details
First of all, welcome to SE!
As for your question, even determining what is canon for Forgotten Realms is kinda tough. Ed Greenwood, the creator of the Forgotten Realms, says in regards to "canon":
any published source relating to the Forgotten Realms campaign setting. This means that if it is for sale in paper (or digital) form then it is official Realmslore.
Ed Greenwood is the creator of the Forgotten Realms, and according to the original agreement between him and TSR, everything he writes and says regarding the Forgotten Realms is canon, unless or until superseded by published material from TSR or WotC.
This link, however, shows that Salvatore wasn't particularly adhering to some details of the setting for his novels, so his additions may conflict with other, also-technically-canon novels and the sourcebooks.
According to the D&D 5e designers, each edition of D&D has its own canon, as does every other iteration of D&D media.
In July 2021, Wizards of the Coast published an article by Chris Perkins titled "D&D Canon" in their D&D Studio Blog column. It explains what the D&D 5e designers consider canon for D&D 5e, and specifically mentions Salvatore's novels as an example (emphasis mine):
Our studio treats D&D in much the same way that Marvel Studios treats its properties. The current edition of the D&D roleplaying game has its own canon, as does every other expression of D&D. For example, what is canonical in fifth edition is not necessarily canonical in a novel, video game, movie, or comic book, and vice versa. This is true not only for lore but art as well.
This approach allows R.A. Salvatore to write Drizzt novels without having to worry if his version of the Forgotten Realms perfectly matches what we do in the roleplaying game. It means that a D&D video game can take elements from a series of novels and present them in a way that serves the game’s needs, rather than adhering to the sequence of events chronicled in the novels. Creatively, it’s liberating. This approach also acknowledges that different media have unique challenges and requirements.
Every edition of the roleplaying game has its own canon as well. In other words, something that might have been treated as canonical in one edition is not necessarily canonical in another. For example, the succubus was classified as a devil in fourth edition, even though it had been a demon in previous editions.
It can also be said that every campaign that’s ever been run in any of our published settings has its own canon. Your version of the Forgotten Realms has its own canon, which doesn’t make it any less valid than anyone else’s version. Elminster might be a lich in your Forgotten Realms campaign. Elminster might be a miniature giant space hamster in mine—both are acceptable and awesome.
In short, only D&D 5e tabletop RPG materials are considered canon for the D&D 5e tabletop RPG. Obviously, since D&D 3.5e is an older edition of D&D, this article doesn't discuss it in depth, but it does explicitly state that each edition has its own canon, and that the canons of other D&D media (including novels) are distinct.
As stated later in this article, the D&D designers have intentionally avoided trying to establish that all D&D-related media across all time must exist in the same continuity. Apparently, they don't want DMs and players to feel like they have to consume every bit of D&D-related content ever to understand the world.
Chris Perkins also states that what they consider "canon" is simply meant to help them maintain internal consistency across D&D tabletop RPG products within the edition; what the designers consider "canon" should have little effect on how people interact with the game.
As noted at the end of the excerpt I quoted above, any given D&D 3.5e campaign by any given DM could have its own "canon" – whether that solely builds on top of official D&D 3.5e canon, or is completely different from 3.5e lore. So you certainly could treat the information from Salvatore's novels into your campaign as canon for that campaign, and try to incorporate it into the campaign somehow if you wanted – but the D&D designers explicitly don't want folks to feel pressured to do so. Even the D&D designers themselves could just choose to leave that lore/information where it is, and not consider it canon for the tabletop RPG.
In short: the Salvatore novels aren't "fanfiction", but they're also not considered canon for D&D 3.5e (or D&D 5e) campaigns. What's canon for the Salvatore novels isn't necessarily what's canon for D&D 3.5e in general. And regardless of what's canon for either of those, any given D&D 3.5e campaign can have its own canon that might be different from both; what the D&D designers consider canon for the materials they make doesn't really impact what's true in your own campaign.