There is no issue with the game, and it does not crash randomy. Only when I go onto my other screen and for example pause or start a video, I then go back to minecraft and as soon as I click on it, the game freezes for a second and crashes. This has happened on multiple accounts. Its with both normal minecraft and mod packs.
So i was wondering if there was a type of fix to this?
Surely there is a fix, but as there are many reasons for a crash there are many fixes for them. If one wants to pinpoint the correct fix, one needs to know the exact reason for the crash. A crash report tells you the reason for crashes most of the time.