AppleTV Airplay stops when Screen Locks so irritating

I keep my phone auto locked after 2 mins. But when I Airplay onto my Apple TV, its such a bad experience that when the iPhone goes auto locks, Airplay stops. I don’t want to be changing the settings every time I have to airplay and then reset the Auto Lock settings. Its a security issue hazard, if you forget and leave your iPhone accidentally unlocked. The whole purpose is to automate this as much as possible.

Do you have around any work around (shortcuts) to get by this issue other than manually changing Auto Lock to Never and back to 2 mins.