[BR] JUCE 9.0.5, macOS: 1st-level PopupMenu submenu items can't be clicked in Logic Pro

I found a regression on 9.0.5. Opened an issue about it on github/JUCE, full details there. The problem:

On 9.0.5, since 5bc3927, items in the 1st-level submenu of a PopupMenu can’t be clicked in an AU plugin in Logic Pro. Hovering highlights them, but no response to clicks. Deeper submenus work. The menu is shown with showMenuAsync(PopupMenu::Options{}.withTargetComponent(menu_button)). Adding .withParentComponent fixes it.

There’s no issue in Reaper, AU/VST3 works, standalone also works. 5bc3927^ and 9.0.4 works everywhere.

Yes, Logic doesn’t support child windows on plug-ins for some reason.

Adding withParentComponent completely changes the behaviour of the menus, so that’s not a proper fix for me.

It would be nice to have a way to opt out of child windows popups at runtime (in the LookAndFeel for example) so we could get the legacy always-on-top behaviour when the host is Logic (and probably MainStage and GarageBand too).