tldr: Sonos app stops playback when playing from "On this iPhone" within 2 mins after going to sleep. SOLUTION: On your iPhone, go to Settings > General > Background App Refresh. Turn Background App Refresh on and make sure the Sonos app is checked off. DONE.
FYI: I am running iOS 12.1.4 and version 10.1.2 of the Sonos app
This problem can be summarized as follows. You open the Sonos app on your iPhone, go to Browse, select "On this iPhone," play some music, and then within 2 or 3 minutes of your phone going to sleep playback stops abruptly. When you reopen the Sonos app on your iPhone, sometimes it remembers which song you left off and it will start playing the next song in the queue after a short delay, sometimes it will completely forget where you were on the queue and you have to manually start the playback again.
I googled this issue extensively and found several solutions out there focussing on "wifi interference" as the main culprit. Many solutions worked for some people, such as:
1. Changing Sonos channels for wired connections
2. Changing channels for various wifi access points around the home
3. Having fixed IP addresses for all Sonos speakers
4. Turning off Airplay on your devices and/or AppleTV
NONE of these solutions worked for me. I'm by no means a tech expert, but I believe the problem for me had to do with what happens to certain apps when your iPhone goes to sleep (e.g. when watching netflix and you manually lock your phone, Netflix will stop running immediately). See this post: https://en.community.sonos.com/troubleshooting-228999/sonos-skips-or-stops-when-playing-music-from-iphone-6813185/index1.html#post16287869
Other people have noted that you can turn off the auto-lock feature of your iPhone to get around this issue and each of those people also agreed that this is an annoying and impractical solution. For me, a far more PRACTICAL SOLUTION that has worked is to turn on Background App Refresh on your iPhone and make sure the Sonos app is checked off. Whether only the Sonos app is checked off or all apps are checked off has made no difference in my experience. After doing this, I've encountered zero issues with playback from "On this iPhone" in the Sonos app even after undoing "solutions" 1-4 enumerated above.