This *just* started happening to me and I am pretty darned pissed about it!
I don't know if it means anything (probably does) but it *never* happened until I downloaded Nova Launcher because I wanted to test something for another thread. Now, even with Pixel launcher re-enabled, Nova uninstalled, and two reboots - it's still doing it!
I noticed one thing which may be important:
With AOD enabled, the flash comes after hitting the power button to turn off, in between the phone going off and the AOD coming on.
However, with AOD disabled, the flash does not happen on power off. Instead, it happens in the moment after my fingerprint is recognized and before the rest of the display comes to life.