See attached code (and or run it on a system similar to the attached qtdiag.txt). Notice there may be differences depending on primary screen, and which one is placed left or right etc.
However, Qt fails to resolve which screen the QMenu is shown on and gets a wrong size. Despite it is regression a regression it is not a major (P1) issue because there is an easy work-around with setting parent on the submenu to the menu. It however should be fixed.