I have had the same issue at certain times - I think my glasses might be pushing it right to the edge on occasion. Lying down with your head touching anything else would be an easy way to get false triggers. I turned it off to try without, and then left it on. I like the feature, just wish it was a little more reliable.
Sometimes on removal music hasn’t paused - on my laptop in particular. That might be related to which app is in the foreground though, the computer has to know where to send the pause command and may not always get it right.
I took a screenshot of the same page to show the same misidentification of the device.
Another set of headphones I have powers off when you rotate the earpiece to flat for storage / carrying - that seems to me a simpler and more reliable version of this sort of detection. It happens pretty naturally when I take those off completely or pull them down around my neck, so it pauses (very reliably) and saves battery power. And reconnection is so fast that it isn’t inconvenient.