Composition selection bug in contenteditable | Webkit

[IOS 16.4.1] I recently noticed that if there is a contenteditable field on the page in the browser and it is cleared during the touchstart event, then such a selection remains.

I did not find any solution to this problem on the Internet. How can I fix this problem?