Shelly plug 'ghost switching'

I started using a Shelly US plug to control a fan at night via an automation. The automation works, turns on the fan at 10 PM. But shortly after midnight the fan turns off on its own. In the HA logs I see the state change, but nothing triggering it. The plug’s power consumption is normal, and if I turn it on manually after this happens, it runs for hours until the automation turns it off at 8 AM.

I see nothing in the logs or history associated with this turnoff.

The Shelly app has no timer set for this plug, and it doesn’t have cloud access

Where and how can I gather some more clues?