Playback stops on Android phone

When I try to play on a Samsung S8 phone (Android 9), it plays for a few minutes and then stops.

I set the Roon app on the phone to “not optimized” and switched battery to “performance” in case it was a power saving issue, but it still stops.

It is usually about 4-5 minutes after starting the playback.
I am playing from music files on a NAS, not a streaming service.

Any suggestions?

PS the problem doesn’t occur if I am constantly using the computer with the Roon Core - so it seems to be a time-out on the computer (Windows 10) not the phone.
However, the PC has the network adapter set to high performance and no power saving.