Unable to switch SDK (command line tools)

I installed the command line tools 14.1_beta_3 (SDK MacOSX13.0.sdk) and I cannot switch back to use the command line tools for an SDK that is compatible with software I am trying to build.

I have both XCode 13.4.1 (xcode.app) AND XCode 14.1 Beta (xcode-beta.app) installed. XCode 13.4.1 points to Command Line Tools (Xcode 13.4.1) but I still get an error in my build that points to the beta MacOSX13 sdk.

I have tried switching the tools (xcode-select -s /Applications/XCode.app) with the same results.

I tried just removing the CommandLineTools folder from /Library/Developer/CommandLineTools and re-installing the command line tools with only 13.4.1 but then the build says it cant find the MacOSX13.0.sdk.

At a loss what to try next.

Did xcode-select print an error?

No error, in fact switching between .../XCode.app and .../XCode-beta.app followed by the -p prints the correct path to the selected sdk, but the error is still the same.
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here

Unable to switch SDK (command line tools)
 
 
Q