Have you tried manually downloading Xcode 14 and installing alongside Xcode 15?
https://xcodereleases.com/ It takes a while to download and install (so many hours lost doing this over the years). After installing, switch the command line tools version to 14 in settings -> locations -> command line tools.