I am trying to create custom menu items in SwiftUI app for mac os (SwiftUI App life cycle). I don\'t quite understand the following behaviour:
In the code below: