We had that for a few generations- the flush camera because the phone was thick enough to make it flush...
Then Apple realized that the growing power efficiencies of A-series chips meant they could save a few cents per unit by trimming battery and spinning "same great battery life" in the "big reveal." Customers just ate it up and rolled with it, leading to "another record quarter in revenue and profit" over and over.
Physics won't let the camera module thin to the rest of the "thin" an iPhone could achieve. Jettison the camera completely and a future iPhone might be able eventually reach the "few credit cards thick" goal stated some number of years ago.
So the protrusion is forever because the physics will never accommodate "thinner." Basically, these 2
different products are in increasing conflict and Apple- or anyone else- won't be able to overcome that conflict because physics can't be overcome.
So the solution is as you suggest: thicken the rest to the depth needed for whatever camera is desired inside... which WOULD accommodate much more battery... at the expense of the added weight of much more battery and whatever people feel about thin vs. thick.
This problem also doesn't get resolved in the thicker "fold" type phones as one half of any fold would still need enough thickness to fit in a camera module. So any "flush" answer is not there either unless the camera quality is significantly cut so that camera modules like those in early generation phones would be deemed "good enough" again.