When in full-screen mode, the game often minimizes due to using the scroll wheel menu or inventory/ingame menus when the mouse focus isn't actually in the game itself (say, you've been turning right a lot and your cursor is, while invisible, on the next screen over).
Mouse cursor should ideally be locked on dual monitor setups from straying off the primary monitor, even in menus.