I managed to have a work around for this issue, but I have clear a couple of things up:
It was a electric sound I heard and it was only while my Logitech G502 wired is connected to any of my USB-A ports and my G15 is connected to the power (wall outlet).
After some research, I found out the sound is caused by the high polling rate (1000) of my G502. The polling rate of 1000 is the default setting, when you do a fresh install of the Logitech G-Hub software. When I change the polling rate to 500 or lower, the electric sound is gone.
Fortunately, G-hub is able to create profiles for your desktop and games.
For my default desktop profile I set the polling rate to 500. (I can also set it to 125, but I choose to do 500, because this profile is also used for Blizzard's StarCraft 2. Creating a profile for StarCraft still not working with auto switching......... but that's a other issue).
For al my other game profiles, I leave the polling rate to 1000, because I don't pay attention to the noise when I'm gaming.
I someone else has or had this issue, I hope this will help you out.
Here is some more info about the polling rate for diffrent brands of gaming mice: