Another option is to use the “Guided Access” accessibility mode which lets you lock the phone into the current app, requiring a password/optionally FaceID to unlock it. Can be activated with a triple click on the power/home button. It’s also great to use with kids to stop them switching apps.
It’s effectively a kiosk mode.