Delay timing to evaluate Menu content until it actually opens (macOS)

SwiftUI’s Menu is used also to display view controls like pop-up buttons. However, in such cases, its content is evaluated at the moment the button itself appears, although it’s not required until the menu is actually opened. Additionally, since the menu content isn’t re-evaluated when opened, if the content is dynamically generated, there could be a discrepancy between the actual state and the displayed state depending on the timing.

Considering these points, I’d like to delay generating the menu content until the moment it’s actually opened.

Is there a way to delay the evaluation and generation of the Menu’s content until the moment its contents are displayed?

Note: I'd like to know about using it within a macOS app.

Delay timing to evaluate Menu content until it actually opens (macOS)
 
 
Q