Block the incoming askew light rays from entering your lens. All lenses exhibit flare when pointed towards a bright light source. You want better performance, buy a more expensive lens and camera package. This one will help minimize flare.
These should do nicely.
Leica Noctilux 50mm f/0.95 — $14,225
https://www.bhphotovideo.com/c/product/586190-REG
You’ll need a body to put the lens on,
Leica M-11 -D Rangefinder — $10,055
https://www.bhphotovideo.com/c/product/1852094-REG
So for just under a mere $25,000 you can minimize flare and ghost images real well.
All kidding aside, All cellphones suffer from the same limitations. But if you’re willing to to throw enough money at something, you can fix it.
Plenty of feature films have incorporated iPhone footage into high end cinema scenes and avoided the flare you’re experiencing.