Panel plugin menus don't popup at the right place and a shadow appears when hovering over the plugin

Here with the app menu, but the same goes for all plugins:

menu-popup

menu-shadow

Note that this is on my external monitor, and the position of the menu/shadow depends on the scale set on the internal monitor (see #61/#63, scale is 1.25 by default on the internal monitor), so I suspect the panel thinks it's on the wrong monitor. So maybe the problem is with the panel, but it doesn't happen with any other compositor, so…