When you run:
arguments[0].value = arguments[1];
You are mutating the DOM directly, but React does not look at the DOM to decide state.
React only updates when the onChange event comes from a real user interaction, with the actual event properties it expects.
Selenium’s synthetic events don't trigger React’s internal “value tracker”, so React thinks:
“No change happened, keep using the old state value.”
That’s why the visual field shows your injected value, but the DOM + React state still have an empty value.