Does OK Google work with your phone's display off? (either unplugged or charging)
What phone and OS version?
I ask because I've been bothered by the mysterious disappearance of the feature earlier this summer for me and I've only really seen some isolated device-specific discussions or questions without much attention. So I'd like more data!
Sometime in the last few months, OK Google stopped working on my Moto Z Play (7.0, 7.1.1) when the display is turned off, I clearly remember using it in the past, so it's definitely not a hardware limitation, and hasn't been for a long time. When the display is on, whether with the screensaver feature or during use, OK Google works perfectly.
(not when Moto Display pops up however - and Moto Voice is disappointing, only bringing up pre-Assistant Google and being unable to do anything without needing me to unlock the phone - largely defeating the purpose.)
I didn't find the right solution from the Internet.