There are several reasons why your iPhone keeps turning dark and turning off mode called "Auto lock", Which automatically sets the device suspended / locked after a certain period of time. Before entering Auto-Lock mode, the screen reduces the brightness by half. To fix this, you need to turn off Auto Lock.
First, open the application “SettingsBy pressing the "gear" icon.
At "Settings", Press"Screen and brightness".
Then select “Appearance & brightness", Scroll down and press"Auto lock".
In Auto Lock, you will see a list of time options. These determine how long your iPhone screen will stay on before it turns off and enters lock mode.
In this case, because you want to turn it off completely you will select “Never".
After that, exit the "Settings". Whenever you open your iPhone, its screen will stay on and will not go into lock mode until you press the button.
If you continue to face problems with the screen brightness, even if Auto Lock is off, may be due to Auto Auto Brightness being turned on. "Auto Brightness" can be turned off in the accessibility options in the "Settings" application.
However, there are some disadvantages to disabling "Auto Lock", the first being that battery the mobile runs out much faster. In addition when the mobile does not lock you automatically anyone could use it. Therefore, it may be best to re-enable Auto Lock when you are done.