One neat thing you can do on visionOS is programmatically change the size of the window, so you can make a button that does this: