If the derailleur is shifting ok, that sound probably isn't a loose derailleur. More than likely, it's "chain slap" which is normal.
If it's really annoying, you can invest in a fabric chain stay protector (which has the dual purpose of - you guessed it - protecting your chain stay
). Or, if you have an old tire tube, cut off a section, wrap it around the drive side chainstay, and zip tie it to the frame.