it's the low voltage alert in the truck, when the unit is off, the current can draw at normal amount. When the truck is on, the voltage drops and that is why you are getting a loud buzzing, have you also noted any flickering of the lights while the motor is running?
There is a relay that has a voltage cancel device built into it on the market. that should fix your issue.
Hi LC I have a 2011 ram which I installed an HID which due to TPM protocol won't work perfectSo I manufactured my own harness with six relays and six fuses one for each bulb
The crazy thing it works fine with the engine off but when on the relays keep buzzing and some beams will shut off until I put them off and on again
Can you help