I’ve used this (successfully) in the past as a solution to this issue:
https://docs.generatepress.com/article/menu-item-height-width/#sub-menu-item-width
Now seeing something weird though, on only one sub-menu navigation item, the content is wrapping, but for the others it is not.
This is what I ended up having to put into place.. but it’s not ideal, if the client changes a navigation item title this margin-right width will need to change.
/*Auto adjust width to match the longest sub-menu item*/
.main-navigation ul ul {
width: auto;
white-space: nowrap;
}
.main-navigation ul ul .menu-item-has-children {
margin-right: 50px;
}
IMHO, I think Automatic Sub-Menu Item Width should be an option in Customizing ▸ Layout ▸ Primary Navigation