Barrel harmonics, barrel whip, and vibrations of all types is a VERY complicated subject. WAY beyond what anyone can or should try to cover here. Don't forget that barrels (and other parts) can move in many dimensions and forms and harmonics. Bending up and down, sideways, whirling, twisting, and lengthwise (stretching). Each of these can be at different natural frequencies as well as multiples of these frequencies. If you ever get a chance to measure it, simulate it, or film it, you will conclude that it's a miracle that any rifle can shoot as well as they do.
Although light barrels can shoot exceptionally well, heavier barrels slow down the frequency of the vibrations and thereby widen the accuracy nodes - its plain old physics and cannot be refuted. Therefore, heavier barrels are easier to tune, less sensitive to other variables, and more consistent. As JE Custom said well, weight is your friend.
In my humble engineering opinion, it is impossible to eliminate vibrations. But, if absolutely everything about every shot is exactly the same as every other shot, every shot is much more likely to shoot the same as the other shots. It doesn't really matter if the barrel does a limp noodle whirly gig as long as each whirly gig is exactly the same as the others. In my view consistency (doing everything exactly the same each time every time, is everything. Heavier barrels help with that.
I will differ from other opinions on the subject of fluting. Fluting increases the cross sectional moment of inertia for equal weights. Therefore, a fluted barrel will behave and vibrate more like a heavier barrel than will a non-fluted barrel of the same weight. It also helps keep the barrel cooler by dissipating more heat than a non-fluted barrel can.
Some machinists also believe that residual stresses from the machining process are a problem. I have no facts on this aspect of fluting and therefore no opinion.