The context of your requirement is not clear to me, hence a general answer.
Certain built-in iOS apps will prevent the screen from locking automatically when they are actively in use. Some examples include:
- Camera App (Video Mode) – When recording video, the screen will stay on indefinitely until you stop recording or manually lock the device.
- Phone App (Ongoing Calls) – When you're on a call, the screen will stay on if you're using the speaker or interacting with the keypad.
- Voice Memos (Recording or Playback) – When recording or playing back a voice memo, the screen stays on.
- Apple Maps (Navigation Mode) – While using turn-by-turn navigation, the screen remains active.
These behaviors are designed to ensure that the user experience isn’t disrupted while performing tasks that require continuous screen visibility.