I think weight does affect the sound, but it’s merely one of a whole range of things that affect how a bass sounds and feels and by no means the most important. And even then, the weight could be beneficial or detrimental to the sound when mixed with different factors like electronics, neck type, hardware, strings, even the finish.
As such it’s impossible to say, and the only way to judge an instrument is as a sum of its parts.