I’m using an iPhone 12 Pro Max, having also previously used an iPhone X for 2+ years. Like you, I find the 12 Pro Max’s camera terrible by comparison due to these constant blue-green artifacts in the images.
I’m really disappointed with the camera on the 12 Pro Max because of these artifacts or roaming dots/reflections. (I wouldn’t really consider it lens flare.) It occurs far too often, pretty much whenever it’s bright outside, or if there’s almost any light source nearby, even if it’s not in frame. I can’t even take a photo in my house at night without getting these annoying reflections. My ceiling lights are apparently too much for the 12 Pro Max.
I never once noticed anything similar in the thousands of photos I took with the X.
I find the top ranked “helpful” answer (which is essentially “that’s just the way it is, even my fancy camera does it”) rather unsatisfactory and misleading.
The answer to your “better camera = worse artifacts?” question in my experience is a resounding no. I’ve got a Canon 5Diii and 1DXii which are objectively better cameras than any iPhone ever will be regardless of how good the software trickery gets. Shooting in as identical conditions as I can manage, I’m not able to get my “better” cameras to throw artifacts like the 12 does. Obviously they will if you point them straight at the sun, like anything else would.
But personally I think it’s kind of pointless to compare a multipurpose phone that needs to fit in your pocket, with a purpose-built DSLR or mirrorless camera, which can be however big you want/need and have a huge array of lenses available. Not to mention those cameras (and lots of their lenses) cost many times more than an iPhone.
Despite the top answer suggesting this obvious flaw can improve our photos, I’ve not once felt that my 12 Pro Max photos were ‘improved’ by these artifacts. They’re distracting, unsightly blue-green dots on (almost) all your photos. Nothing like deliberate lens flare you might sometimes go for with your actual camera.
It’s poor form by Apple and something that should have been picked up on in testing. I hope they push an update to tweak the image signal processor to automatically remove them or some other software update to compensate for this glaring hardware flaw/fault with their new camera. We shouldn’t be expected to have to Photoshop them out ourselves.