The code in charge of adding inside a dropdown the menu items that would be forced on a second line was not doing it properly when there were some display: none items and especially not when there were neighbours using the m*-*-auto classes. Part of https://github.com/odoo/odoo/pull/56427 task-2264627 X-original-commit: 87a90f6816c0ce3db7d9d2edbe1b5149fd7bacff