Hello,
I've tested your code on Mac, and it worked fine as expected.
I am not getting the menu, just getting the window only.
On Mac platform, the menu bar will appear at the top of the screen instead of in the window.
You could refer to What’s in the menu bar on Mac? to get more details.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.