SwiftUI Menu - no action/ontap closure?

I am using a SwiftUI Menu and need to log whenever it is selected/opened, but there doesn't seem to be a reliable way observe that action in the API.

Observing the appearance of the Menu contents works alright, but will only be triggered on initial appearance. Subsequent presses are ignored and can sometimes be triggered even if the Menu was not opened (for instance, if used in a toolbar). I presume this is because the contents are cached and sometimes created eagerly under-the-hood.

Menu {
  contents
  .onAppear {
    LOG
  }
} label: {
...

I cannot use primary action, because then I would give up the ability to open the Menu on press.

I've tried many variations of simultaneousGesture on the Menu, on the label, parent etc. This - oddly enough - tends to work in the toolbar but in most contexts is ignored.

We could try Button + .popover but I presume doesn't come with the same styling and behavior across devices and iOS versions.

I'm new to iOS development, but from my limited experience this has been a large pain-point with SwiftUI. Some of the components provide a limited API for observing and logging similar user interactions. Are there any libraries or SwiftUI initiatives to improve this aspect of the framework? Or perhaps something else I've missed?

SwiftUI is off-topic here; it's a closed-source Apple framework, not part of Swift itself.

Try the Apple developer forum.