Screeching Metallic Sound when plugging in USB-C Charging Cable
I had this same thing happen to me around July 2018 on a MBP 2017 15", this happened when I connected an AmazonBasics AV adaptor, I only own a couple of dongles, that one and the usb c to ethernet one from Amazon too, it has never happened again.

After it happened, I noticed that when using the internal speakers as soon (could be a few seconds) the audio reached a certain level, high sounds would be lost and audio would sound muffled.

It's on service now, they are replacing the top cover which houses the keyboard, battery, speakers and other components.