SDL-Android-App freeze/crash after lockscreen

I’m developing apps for android using the SDL template. All my apps have trouble, when screen is locked while running. Manually or automatically lock makes no difference. Lots of devices don’t come back from lockscreen (e.g. Samsung s4mini, Samsung s3), others do ( Samsung tab a9). The phones freeze for minutes. Sometimes they never come back out of lockscreen. The devices crash so hard, that only reset or removing the batterie can restart it. I think it has something to do with resuming the app after onDestroy(). The app tries to resume and doesn’t succeed. The resuming after onPause() works fine, by the way.

Who has experience with that issue ?
Is there a way to force the app to exit completely, when screen is locked, so that it doesn’t try to resume after lockscreen ?