The problem is that since RPA V7.0 executeScript_Sandbox is no longer 100% compatible with executeScript. The reason is that due to the upgrade to manifest V3 we must use different Javascript interpreter for the sandboxed version of the command.
So while executeScript (which runs in the website) remains unchanged, the _Sandbox version uses now JS-Interpreter - and this library has no access to Chrome APIs like “localStorage.setItem”