I did the same test using a trivial html page and I got the same result You received.
But in my complex environment I got the result I showed before.
I can’t figure where I can do a change because the textarea is not in my html but is generated from smart element.
In my code I use jquery (3.6.0) and jqueryui (1.12.), I don’t know it it could cause the problem.