Based on the power-saving design of phones, if the camera is not operated for more than two minutes in the foreground, the system will automatically exit the camera. This is a normal phenomenon. It is recommended that you exit the camera app in time when you are not using the camera to reduce unnecessary power consumption.
Related Articles:
How to fix Blur images in camera night mode
Camera is unavailable due to phone heating