How to override Catalyst window traffic lights behaviour?

Hello all,

I was wondering how to override the traffic light actions in the scene windows in macCatalyst apps. For example, to get a save prompt on window closing instead of directly closing the window scene. The Twitter app on the Mac App Store has this behaviour where a New Tweet window will prompt for discarding the tweet if you close it without tweeting but I cannot seem to find anything within UIWindowScene(Delegate) or UIScene(Delegate) that can accomplish this behaviour.

Thanks.
How to override Catalyst window traffic lights behaviour?
 
 
Q