For me changing the update on mainQueue did work in iOS 15.
@Published var textFieldText: String = "" {
didSet {
if textFieldText.count > 2 {
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
self.textFieldText = String(self.textFieldText.prefix(2))
}
}
}
}