Running WDA on iOS 17

For iOS <17 you can install WDA on the iPhone and then run it manually whenever. For iOS 17 I leave the automation running when it starts after installing WDA, but it immediately stops when iPhone is disconnected (USB/network) from the MacBook.
I am running Appium server on Ubuntu so phones can not be constantly connected to the MacBook.
I install WDA with command:

xcodebuild build-for-testing test-without-building -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<UDID>' -allowProvisioningUpdates