The “Close Tab” icon in Safari has a few pixels on top and bottom where it visually tells you that you’re already in the hit box, but clicking doesn’t actually do anything yet.
I couldn’t reproduce it at first, so I experimented a bit – so far it seems like it’s only happening when you are not using Dark Mode. Maybe it (also?) has something to do with whether your display is using a Retina resolution or not.
Thanks Fuchen for the video!