I'm stunned it had to be done in that exact sequence (I had tried several similar but not identical approaches), but @KMT's solution worked perfectly for me (Xcode 12.5 beta 3).
Post
Replies
Boosts
Views
Activity
I'm on an M1 Air as well (low end -- 7 cores, 8GB).
But launching Xcode Beta -- without any simulator running or any projects open -- is enough to get Spotlight churning continuously.
I changed the Spotlight prefs to uncheck Developer, but that was no help. Did not try unchecking everything.
Still seeing it on M1 Air, Xcode 13b5, Monterey 12b6.
Xcode just sitting there -- not running any apps -- is consuming about 240% CPU, Spotlight about 110% CPU.
Running then stopping an app launches a second Spotlight process, with similar CPU.
Quitting Xcode but leaving the simulator on the home screen -- not running an app -- leaves a Spotlight process consuming ~170% CPU.
Nuts.
(Quitting the simulator as well brings Spotlight back to 0.0% and drops the cpu back to negligible levels.)