A big welcome to the forum.
I am no electrical whiz kid. Have you by any chance used the lighting circit for the live feed for the buzzer ?
This may account for the poor performance when the lights are on.
If all was well when you first fitted it, perhaps you have a faulty earth connection.
Where electronics are involved, some components are very sensitive to voltage fluctuations. They will work fine for a while then start to fail.
Have you fitted a voltage regulator in your buzzer unit ?
When you have your lights on your alternator will be kicking out between 14 - 15 volts. It may be too much for some electronics and will need to be regulated.
That's about all my pea brain can think of.