Ok, so I haven't managed to find the fundamental issue, but I did manage to find a temporary solution at least. After weeks of investigation, I found that it is the Realtek drivers which cause this. Using the generic Windows 10 audio driver makes the problem go away. I have been using it for more than a week and the problem didn't show up not even once. With the official drivers, however, it would happen multiple times per day. I tried to use both the driver from the official Realtek website and the one from the official ASUS website, but both had the problem.
I didn't manage to find any pattern at all when the problem was occurring. Differently from what I thought initially, the problem shows up in any situation (not only when gaming).
Also, I've noticed that when I changed the microphone volume with the old drivers (official from ASUS), my friends would hear that same white noise on TeamSpeak. It is quite a deafening noise -- every time it happened I would almost have a heart attack (and they also described it the same way). It is way, way louder than any other sound that is playing and it's got a very high pitch.
Anyway, when I have some time I'll try to investigate a little more and see if I can discover something more.