Stopping rattles is a real chore and while dynamat and other sound deadeners can help, rattles are not what the product was designed for. The purpose of that type of sound deadening material is to reduce the resonant frequency of the part it is attached to. The primary reason for doing so is to reduce the amount of road noise that is retransmitted by the panels of the vehicle. Road noise is usually in the middle frequencies and adding the mass of a sound-deadening product reduces the resonant frequency below that generated by tire/road/wind noise. In some cases, reducing a panel’s frequency can make rattles worse by placing the resonant frequency closer to that of the subwoofer. Many times an installation of sound deadener will accidentally stop a rattle by physically being placed between the offending parts, forcing them apart enough to keep them from moving intermittently against one another, which is really the source of the noise.
I am not against the proper use of these materials, but many (shops, people) miss-apply them leading to panels that don't fit properly, window and door controls that don't operate properly or retention of moisture against body panels and other parts that leads to rust or other potential for damage. Also note that many of these product work by adding weight, look at the shipping weight of the product you are using and add that to the overall vehicle weight while subtracting that amount from the cargo capacity. Amps, speakers and enclosures also add weight. More weight = less MPG and performance.
Keeping in mind that the real source of the offending noise is often unfastened parts that are touching one another, the real answer is to find out what the parts actually are and then either properly fastening them together or finding a way to keep them apart, all without causing any other damage or safety concerns with your vehicle.
Just as each installation is different, each vehicle is a little different, so there is not a single answer that will resolve each offending noise.