You set up an old Huawei or Honor phone as a camera. It is on the charger, the screen is off, and the camera app is recording. When you come back, the recording stopped long ago. No error. The app is closed, or it opens fresh as if it never ran.
On these phones that is usually not a broken phone and not a broken app. It is the phone's own power management, which closes apps you are not looking at. A camera with the screen off is exactly that kind of app.
This guide shows the settings that cause it on Huawei's EMUI software (which older Honor phones also use), where to find them, and how to test your phone in ten minutes.…