Disable Xcode Command Line Tools
Quit Xcode
Open a Finder window showing your Xcode program
Open a command line prompt (terminal.app is fine)
Type xcode-select --switch
Drag the Xcode program icon you want to be default into the command line window and release the icon
Press enter

The select tool lets you have multiple versions of the tools and switch back and forth or even request an install from Apple of the tools without having Xcode.app installed. If this process fails, your Xcode preferences are corrupted, so you’d uninstall the app or make a new user profile to validate whether the app preferences or user preferences need to be trashed or fixed.