I've been having this problem for several months now. I'll be playing a game, and suddenly, it will minimize to the desktop. I can easily get back into it by clicking on the icon and continue playing, but about half a minute to a minute later, it will minimize again. Luckily, after getting back into the game again, it will not happen for several hours. But then the cycle repeats.
After googling this, I found the Event Viewer on my computer, and the next time I happened, I immediately opened it up to look and see what was causing this. Apparently, according to Event Viewer, the culprit is RestartManager, ID 10001. I made sure I had no Windows Updates pending, and even restarted several times to try and resolve this, but the problem persists. All I have otherwise running in the background is Eset and Geforce Experience, and neither had ever been an issue ever.
So I'm hoping someone can maybe help me resolve this, because it's quite annoying, especially during raid night on FF14 when I'm trying to heal or when I'm playing a game that isn't exactly merciful if it should suddenly minimize.
Please ask if you want logs or anything, but be aware you may have to give me directions on how to do so.