The camera in iPhone as it stands today is very great, but those wanting a superior camera ought to actually get a dedicated superior camera and not iPhone.Do you really think that wouldn't have reduced the thickness of whatever is behind the camera module (essentially the front glass and very thin black separation layer) as much as possible?
You simply prefer, everything else equal (which includes the thickness of whatever is behind the camera module), a flush camera over a better camera. There is nothing wrong with that preference but you should openly stand behind that trade-off and pretend that there is no trade-off. Maybe there is still some thickness reduction of whatever is behind the camera module possible but that still leaves you with the position that any thickness reduction there should be invested in removing the protruding lens instead of putting a better camera into the iPhone. There is no free lunch.
It is entirely possible to install the same camera and thin the inside of the case around the camera module to accommodate it and get the camera flush. No need to think too far outside the box on this one. It's entirely possible to get a free lunch as well as eating the entire cake for dessert also.
The protrusion must go. It's lazy and unresolved design. This can be done, Apple is choosing not to do it.