I've implemented this Play an notification sound to confirm sleep is triggered so that I've now got a sound for going to sleep and waking up. It turns out that sometimes, immediately after I close the lid, the laptop goes to sleep, but then wakes up again a few seconds later.
Dell XPS 13 9310 (16GB, touch screen), with Ubuntu 22.04.
(Edit 2022-05-28: The problem is intermittent - a reboot fixes it temporarily.)
Any ideas what might cause this or how I can diagnose it?