How can I programmatically prevent an app from going to the background when the user takes off the Apple Vision Pro?

I'm developing a vision pro application. However, when the user takes off the Apple Vision Pro device, the application goes into the background. How can I prevent this behavior programmatically?

How can I programmatically prevent an app from going to the background when the user takes off the Apple Vision Pro?
 
 
Q