This worked for me.
The interesting thing is that I already had Xcode 16 (#####) chosen but the path underneath was somehow different and when I opened the options and selected it again, it just changed to “/Applications/Xcode.app”.
Thanks for sharing.