Time pauses when editor window is inactive

On the top left of the Viewport is a down arrow, in that menu is a Realtime check box, might be what you are looking for.