Running Xcode UI Tests using the Command Line

I am trying to use the command line in order to run UI tests for the apps using this command:

xcodebuild test -project projectName.xcodeproj -scheme schemeName -destination 'platform=iOS Simulator,name=iPhone 12' -resultBundlePath dir/Test-Results/results_file

I run into a build failed and get this as an issue:
 building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64

I am on an M1 Mac (13.0.1) with Xcode running through Rosetta. I was able to fix this issue before on Monterey by duplicating the Terminal and using the duplicated Terminal to run through Rosetta and the issue was resolved. After upgrading to Ventura, it seems that the default Apple Apps are not duplicatable anymore so I am back to this issue. I also don't want to run the Terminal through Rosetta only due to compatibility issues with current installations done through arm already. Is there a fix or work around for this? I want to be able to run multiple test devices through a python script using the command line. Thank you.

Running Xcode UI Tests using the Command Line
 
 
Q