Prevent duplicate windows after reboot

Hi all - question regarding window management after app close or system reboot:

  • My app has multiple WindowGroups, let's call them A, B, C
  • Only A opens when the app launches the first time, which is desired behavior
  • A user can open B and C, with A still open. So 3 different windows
  • If the app is fully closed (force quit or system reboot), 3 windows will appear on next launch, but they're all copies of A

I want to either only open A when the app launches (even if B and C were previously open), or remember which windows were A,B,C and show those accordingly. What's best practice in this case?

I've already checked both of these docs and I'm not seeing any hints https://developer.apple.com/documentation/visionos/presenting-windows-and-spaces https://developer.apple.com/documentation/visionos/positioning-and-sizing-windows

Prevent duplicate windows after reboot
 
 
Q