Hi, and welcome to the forum.
Many people have already stumbled over the apparent discrepancy in advertised and final resolution, at least for the front camera. This support article also talks about “12 MP output”, so that would explain the issue for the front camera.
I cannot tell you anything about the rear (selfie) camera. I suppose we can assume that the sensor there might also use 4 “physical” pixel elements to generate one output pixel. Others might wish to comment on that.