Each of these camera lenses have a minimum focal link for distance that you have to keep in mind. The 5X has a minimum focus distance of 1350mm or 53.15 inches if you get closer than that, the 1x Camera takes over and zooms in to 5X equivalent for the photo. The 1x has an 200mm or 8 inch minimum focus distance. I think if you use your 5X camera with these guidelines, avoiding getting too close, then I think you’ll see that it will function a whole lot better.
The 5x maximum ISO is 8700 so it should do ok indoors. However, if it’s too dark, night mode will kick in, or the 1x Camera will take over.
The only time I’ve seen the camera change from 24 megapixels to 12 megapixels, is during portrait mode. If you change any settings in portrait mode, like the lighting by moving the little cube over (natural light to studio light etc) then it will switch over to 12 megapixels. Everything in portrait mode has to be left at default, you can change your settings later.
If you set your camera setting to HEIF Max, you’ll get 48 megapixels. If there’s a slash through HEIF Max, it will be 24 megapixels if you have that set in settings under the camera.