iMac screen briefly flashes black
My iMac (Retina 5K, 27-inch, 2019, OS 10.14.6) has started flashing a black screen for less than a second. It will flash once or twice, then operate normally for a while, then flash again. I tried turning off Night Shift and automatic brightness but that did not help and rebooting has not helped either. Resolution is set for default for display. I haven't noticed any common trigger for the flashes. The machine works well otherwise but the flashes are distracting and irritating.
iMac 27″, macOS 10.14