Was just dealing with the same thing, and removing the id: \.self from a ForEach I just added seems to have solved it - thanks!
As to the reason, my guess is that SwiftUI is holding a Dictionary of every object, using the id: value as the key - SwiftData is likely mutating these objects behind the scenes, to reload data, fault data, etc. That would cause this error to happen.
Omitting the id: parameter in the ForEach, or using id: \.id would use the stable identifier as the key of the 'hidden' Dictionary, therefore eliminating the issue.
All of that makes sense to me, at least - unfortunately, we use id: \.self so frequently, that I can almost guarantee that I'll make this mistake again in the future. Would be nice if making this error were impossible, or if Xcode had a way to warn us about it.