Nikon service Canada now has my camera. They are examining it.
I borrowed my brother's camera (he has the exact same model, the Z5II). I took pictures in the exact same conditions with both cameras. My brother's camera produced perfect pictures, while mine displayed the black splotches.
There is definitely something wrong with my camera. I hope Nikon service finds and fixes the problem.