Really sorry for the late reply. I'll show you a demo right now. I'm using this: https://www.xfce-look.org/p/1267246/ one of the most popular themes on xfce-look.
This time I have a video.screen
EDIT: Perhaps this is an issue with generic GTK themes? I too am not experiencing this bug with Adwaita or Greybird.
Hey so I was just messing around trying to see what triggered it. My current xfce-panel version is now up to 4.16.3-1 but the bug remains. What I've found was that when I switched my theme to the default Adwaita the bug wasn't appearing. When I switched it to one of my custom themes the bug reappeared.
My xfce-panel color is set to system style. Maybe it's something to do with the panel not properly working with custom themes?
The bug also appears when I set the panel style to a solid color.
One more thing I noticed was that when in a real editing mode, the red lines are quite thin and dull, but when the bug appears the red line become more thick and prominent.
I also remember a few months back when running xfce the same thing used to happen. I don't remember the exact version of xfce-panel that I was using but it couldn't have been too far from the current version.
When editing a panel through panel preferences, thin red lines pop up around the panel in question. This doesn't work as expected.
Sometimes when editing the panel through panel preferences, no red lines appear. Sometimes they do appear.
Sometimes, even after closing panel preferences, these red lines stay. I have to click on panel preferences once again and close the window again for the red lines to dissapear.
I am using xfce4-panel 4.16.3-1.