Apparently it can be fixed using sudo xcode-select -r
I saw it twice but I don’t know how to reproduce manually, or maybe I fixed it, I don’t know.
Sources
- https://developer.apple.com/forums/thread/698628
- https://discussions.apple.com/thread/252824300?answerId=252824300021#252824300021