From the definition of chalcogenids: A chalcogenide is a chemical compound consisting of at least one chalcogen anion and at least one more electropositive element. You have electropositive elements in both cases (Na and Mg cations), but only chalcogen anion in the first case (sulfide anion), whereas in SO4- anion the chalcogen (sulphur) is positively charged, i.e., not an anion. Hope it clears the matters a bit
While agreeing with the explanation given by Sardor Mavlyankariev, I would add that the term chalcogenide is usually reserved for sulfides, selenides and tellurides, rather than for oxysalts of S, Se and Te. And, by the way, those 3 elements are chalcophiles; not "chalcogenides".
The term chalcogeide comes from Goldschmid's geological classification of the elements, and since dimethyl sulfide, diphenyl sulfide, etc. are organosulfur compounds, I do not see much point in questioning where they are chalcogenides or not. See, the point is not to what you can call a "chalcogenide" but rather what other chemists would understand by that term.