Using visibility: hidden|visible should fix the drag/click titlebar issue.
Invisible boxes are not rendered (as if they were fully transparent), cannot be interacted with (and behave as if they had pointer-events: none), and are removed from navigation (similar to display: none).
https://drafts.csswg.org/css-display/#visibility
Using
visibility: hidden|visible
should fix the drag/click titlebar issue.