Scarlet 2i2 cousing weird crackling/popping sound while using discord?

Sometimes when using my microphone on discord, my mic will produce a crackling/popping sound when talking. This only happens on discord, it works fine with any other software. It seems to happen at random times but have recently been happening more frequently.

Im using a Shure SM7B mic with a Focusrite Scarlet 2i2 audio interface.

I believe it might have something to do with the Scarlet 2i2, as i have heard other people using it has similar issues, anyone here tried anything like it?

I have tried everything you can possibly think of to try to fix it, some of it includes:

  • Completely reinstalling discord
  • Changing every setting on discord to try and fix it (litteraly everything, nothing fixes it)
  • Changing the bit/Hz on my mic through windows.
  • Changed buffer size of my Scarlet 2i2.
  • Updated all my drivers.
  • - and much more.

The only temporay solution that sometimes works is simply restarting discord, sometimes it temporarily fixes it, sometimes it doesnt.

Im really out of ideas here, any help would be greatly appreciated.