Another way to go about this, is by creating a Configuration Profile (using Apple Configurator). Using this tool, recreate your VPN configuration and save the file. After you've created the file, open it up in a text editor and look for the following:
Add the following below:
Now after you've installed this profile, a checkbox "Connect on demand" should be shown in the "Network" system preferences. Now macOS will keep your connection alive. Bonus feature: you can also add specific rules about when the VPN should connect or disconnect, depending on which Wifi network you're connected.
See Configuration Profile Reference on Apple's Developer Site for all on-demand rules. And see also the strongSwan wiki where some examples are shown.