I'm seeing the exact same thing as @mattreimer. This looks like an iOS bug because the exact same code using textContent works fine in Mac Catalyst. It also seems to work fine in the simulator.
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags: