Entire vpn ipsec config lost on reboot

It sounds like you’ve hit a bug. Your config was there, saved, but when it’s been parsed on reboot, it’s been ignored due to a problem.

Do you have a copy of the config file on the device? Look in /config/archive and examine those files.

If you can find your config saved in one of those, it would be worth logging a Phabriactor ticket and uploading your config there (sanitized) and explaining in detail what happened.