Then return your phone and try to find one which doesn't do this, but be advised, the current top of the line cell phones ALL do this, including phones from Samsung and Google such as Pixel.
Now, if you'd like to know how to minimize or eliminate these effects, altering the angle of the camera relative to the lights can have significant merits. Before you tap the shutter release look at your iPhone screen. The dots are there and they will be captured. Move the angle of the phone's cameras and you can see how to minimize or fully remove them.
Cameras are only as good as the person behind the camera. Yes, these new higher end phones can take exceptional pictures, but they can also take less than exceptional pictures if one doesn't put forth some effort to see what is in the view before taking the photo and trying to fix what can be seen before taking the photo.