A Flutter app with backend in Kotlin that can detect if a specific app (set by you) is open. When the target app is detected, your Flutter app overlays it and prevents access until a specific action is performed. In this case, you just need to wait for 10 seconds.
You can fully customize it to meet your needs.