Check the steps from this post Inject Js Script: Error HRESULT E_FAIL has been returned from a call to a COM component - #3 by RobotSJ
Also try to upgrade studio and the browser extension from the new Studio, and add a higher delay before injecting the script.