There is a work around, in iOS 15 at least. You can wrap your class in a struct like this ->
struct ItemWrapper: Hashable {
let item: Item
func hash(into hasher: inout Hasher) {
hasher.combine(item)
}
static func == (lhs: ItemWrapper, rhs: ItemWrapper) -> Bool {
lhs.item == rhs.item
}
}