@lachlanda It won’t work. <textarea> element is hobbled in UXP — why? I have no idea. I asked a similar question about getting the scrollbar to function when the height remains static. Adobe wants <textarea> to be limited in scope so that UI designers conform to the Spectrum design system. Personally, I think it’s a major limitation as text prompts are becoming the norm. Alot of text prompts are very long, and I’m not sure why they would limit the usability of the <textarea>. I would argue that it’s probably one of the most important user input elements today! Sorry I don’t have a better answer.
The documentation you linked to is for Web Components, not for UXP extension / plugins. So it likely works in the browser, but not in a loaded extension that uses a manifest to load into the host application.
Here is a previous thread on the matter: Textarea scroll bar