Trying to use Chrome extension to prefill fields in form

Hello,

I have built a chrome extension that will attempt to prefill the fields in Retool form by using DOM call. Below is the code snippet. The fields do appear to be filled in the form but then the fields will become empty after maybe 10~20 seconds. What is the reason for this behavior?

pasteCompanyInfo("title", "name");
function pasteCompanyInfo(socialmedia, fieldname, dataid = 0) {
  chrome.storage.local.get(socialmedia, function (result) {
    const handle = result[socialmedia];
    if (handle) {
	  const fieldId = `#${fieldname}Input--0`;
      field = document.querySelector(fieldId);
      if (field) {
        field.setAttribute("value", handle);
      }
    }
  });
}

If I use the component explorer to view it, I can see that the "value" did not really get set with the DOM api.

Screen Shot 2022-03-16 at 10.21.40 AM

Please advise how to prefill fields by using a chrome extension tool.

Thanks!

Nick