I separated the Codable properties from the one used for Identifiable and it works well:
struct Shortcut: Hashable, Codable {
var text: String
var url: String
enum CodingKeys: String, CodingKey {
case text
case url
}
}
extension Shortcut: Identifiable {
var id: UUID { return UUID() }
}