UITextView attribute text animated on iOS 16

While updating attribute text height and width also updating. Due to that, the text is jumping to the end. After that it was showing remain text in next line.