There seems to be timing problem: if you put a breakpoint in initStickyColumns() in js/sql.js, you can see that the items in #floating_menubar are not stacked like later when the page ready, but are in two or more rows. Thus the height is too large, but is saved in fixedTop. That results in the sticky header position when you scroll down being too far down leaving a gap (see screenshot)
Thanks, made the change with you as author, https://github.com/phpmyadmin/phpmyadmin/commit/98231225e2c962ce224807546c62c6b241040550