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.