Big thank you to OP for sharing their solution!
Just to add my findings when I used it these days on the iOS Safari browser …
google.script.run.withSuccessHandler(google.script.host.close).passResult(result);
google.script.run.withSuccessHandler(google.script.host.close).passResult(JSON.stringify(result));
const parsedResult = JSON.parse(result);