Game freezes when in focus, out of focus is fine

Anyone having same issue? What fixes is there?

Actually bothering me only happens every now an then.