GOG Galaxy notifications for some reason steal window focus causing the game to get switched out. Just to let you know some game got updated that didn't actually, or that someone messaged you that you don't care about and can't find in the broken chat system anyway. :)
As the last poster mentioned, I too stopped launching with Galaxy and the problem went away. I launch it with Steam client as a non-steam game to get the overlay, screenshots, fps counter now and it works fine. Only downside is that Galaxy doesn't track my game time now. Tried to get Steam to launch the game the same way the game's shortcut does -> through Galaxy but that doesn't work for some reason.
Simple solution though is to just run witcher3.exe directly.