Lock any app with Face ID (even if it doesn’t support it)
Open Shortcuts and create new automation:
When [app] is opened,
Start [timer for 1 second]
and select "Stop Playing" under "when timer ends."
When you open that app, a timer will run and close your screen.