Android app crashes after sleep

I am using the Android app for Volumio on my phone. I am finding that after I start some music playing, and the phone has gone to sleep, when I wake it up, the app will show either a white screen, or an error saying the web page is unavailable.

I have made sure the phone is set to maintain it’s wifi connection during sleep. Still the problem happens.

The only way I have found to get it working is to use Android to kill the app and then to start it again. This reconnects with Volumio as normal.

Any suggestions?

I am running lineage android 7.1.2 on a Samsung S5 phone.

Just bought a brand new phone (Nokia 6.1) running Android 9 Pie, and still the same problem occurs.