Thanks, no workaround with border
works though, it only does if you do it in dev tools. The script initially calculates the top position of the next element based on the entire size of the previous element, including border. And since there's a shadow, I guess that makes it think the element is larger.
Where can I find the script in the template files? Would be the easiest to fix it there