Masonry is available in Mega menu & Tab menu.
Edit a Top menu item → scroll down and you'll find an option named Auto arrange columns in any available space (organized into Masonry-like) - enable this option will place menu items in Masonry grid.
When Masonry is disabled, the position of menu items in the second row depends on the height of the first row, which can leave empty vertical space.
When Masonry is enabled, menu items will place in optimal position based on available vertical space, sort of like a mason fitting stones in a wall:
When Masonry is enabled, you can set the number of columns you want to divide the menu into. Columns will be divided equally, and the "Column width" set in each menu item will not work.
Columns in masonry don't place in left-to-right order. The position of columns depends on the available vertical space. This is the algorithm of Masonry layout:
So in menu, it looks like this:
NOTE: Recommend to disable the "Edit on Preview" to see the right position of menu items in Masonry.