Display mode: Borderless Window
To have X4 continue running when it loses focus or is minimized, you'll have to go to your graphic settings and change the display mode from Fullscreen to Borderless Window. You will not notice the difference, because the borderless window will look just like the fullscreen. The advantage is however, that you can leave the game now with your mouse and do stuff on your other monitor (if you have one). In this display mode, X4 will also keep running while minimized.