I haven’t tried your specific example, but I’ve been doing this with my app for the past year and it works fine. A record can be added from the app and it automatically fills data in other sheets for me. I don’t have the sheet open and the trigger works fine. Your script might be different because you are trying to show a toast message in the browser window instead of performing some other action.
Here is an old post with the script I’m using. It runs with the onChange Trigger;
These are the trigger settings I’m using: