You should read the document of the Timer. The timer need to run in a runloop, which Window has but menu hasn't. So if you want to use a timer inside the menu, you may need to create a runloop and add the timer to it. That might work.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: