Can an app keep onto its root access permissions after the phone is turned off?
Apps like SuperSU will remember your decision regarding root access to an app and will give that reply each time the app asks, unless you specify otherwise in the settings.
Make sure your app starts after the device boots.

If your application needs root permissions during boot (not after the device has booted) you'll need to enable "su during boot" (SuperSU)