I have noticed bizarre behavior with my Intel NUC D54250WYK running LibreELEC (although the same behaviour occurred on OpenELEC)
Basically, if Kodi is configured to suspend the system (rather than shutdown) when pressing the power button, the commands sent to CEC are not sent before the system is suspended but are actually sent after the system wakes from suspend. This is the way Kodi behaves when the power button is set to suspend:
Kodi On --> Press Power --> System powers down, TV and receiver remain on --> Press power --> system powers on --> TV and receiver power off --> TV and receiver power back on immediately.
If I can provide any logs to help debug this issue, please let me know how to enable the appropriate logging.