Game lags in editor when unfocused

For me the soultion was to set Fixed Frame Rate in settings.