I have been dealing with this for nearly 3 months now with my daughters Iphone XR 256 camera. At first I thought it was a simply a software glitch and would hopefully be fixed in a update. Middle of January I finally contacted apple support. Told them what is happening and they said sure send it in and they would replace it. I sent a video as to show them what happened. Well they got it in and 2 days later received a email saying nothing is wrong with phone and sending it back. Got it back worked for her around a week and all started over. So again contacted support told them same thing. I was told it would be replaced. This person said oh there is nothing wrong with the phone we cant fix if nothing isnt wrong. I said you requested a video showing and I did upload it to the email. Was told to send it in again and provided more videos showing what the phone is doing. Week later got the phone back saying nothing is wrong. Im not home alot to do this over and over. I live 2 1/2 hours from a local apple store. I am fixing to send it in now for the 4th time. Im showing a youtube video to show what is happening and for some advice on what to do next. Apple has never given me this much trouble. They have always fixed the very few things I have had go wrong with their products. I have removed the sound as it is just my family. Thanks everyone for any advice.