The sound only occurs when I am on the tab of the game itself, when I alt tab it goes away. I'm a big PC noob here but lucky I was able to find a thread from 2016 and someone had the same issue as me, unfortunately, they never found a solution. I'll post the video that they posted here regarding the issue and showcasing it. If anyone has any clue as what this could be and how to fix it, that would be great. I suspect it to be coil whine coming from the GPU or PSU but I am unsure.
Video showcasing the issue:View: https://www.youtube.com/watch?v=kbK9sHUaKyw
Video showcasing the issue: