What does aspect ratio has to do with the megapixels? See this pic, and why 4:3 AR has more MP than 16:9? This is my Moto G4 Plus's default camera app.
The aspect ratio has nothing to do with megapixels. Part of a 4:3 image are removed to get a 16:9 resolution, that is why a 16:9 image has less pixels.



The purple rectangle is your 4:3 picture, and the green rectangle is the 16:9 picture cropped out of 4:3 by the software. 2 megapixels are just removed from an original photo.