I understand that it should work that way, but there is a test app called "Benchhole" that stress tests a device and will cause Foreground service apps to be killed.
This page goes into more details about it:
Even the smallest connection failure or security vulnerability in the VPN system can severely compromise your security and privacy. As a consequence sensitive live-data, logs and traces can be transferred to the Internet within seconds. VPN's can be terminated from Android life cycle The Fire OS...
Even with setting StartServerAt[Exact], my foreground service app will be killed by this stress test app and it will properly restart most of the time, but sometimes it won't restart and needs to have it manually restarted.
I am looking for some way to detect when the device is under stress that might soon kill my app and warn the user.