Weird high pitched squealing noise coming from headphones

A couple of months ago my headphones started making some weird squealing noise whenever I was playing games, changing volume and pitch depending on where I was looking in game. It isn't a loud noise, so I can still hear and live with it (if need be), however, it is quite annoying.

I switched from my front to rear jack and that seemed to fix the problem. However, after a couple of months, the noise has come back again.

Any recommendations on how to fix the problem would be greatly appreciated!

Parts List:

  • Ryzen 5 3600
  • RTX 3070
  • B450 Tomahawk Max