This visionOS project demonstrates how to scale a volume's contents to correctly account for changes to the user's Window Zoom setting.
For a complete description of the issue addressed by this project, see https://www.lunarskydiving.com/blog/volume-window-zoom.
The code that resizes the volume's contents is in the file ScaledBoxVolumeContentView.swift.