The only thing that worked for me is to disable and re-enable Siri (Apple Intelligence) in Settings. I reopened Xcode and it worked.