I am trying to hide the titlebar for a macOS app and despite searching throughout the entire day, there's nothing that points to how I can achieve this. I did find this page in the documentation but I don't understand it.
https://developer.apple.com/documentation/uikit/uititlebar/titlevisibility
How do I remove the part where it says Xcode Previews?
I have used the following on my WindowGroup that works perfectly when the app is being run but it doesn't do anything in the preview.
.windowStyle(.hiddenTitleBar)