When opening image file via UXP plugin, the Scripts/Actions are not run automatically


If we try to open a jpg file entry via uxp plugin in Photoshop it doesn’t run the script/action that is configured in ‘Scripts Event Manager’ (please check images attached).
However, if we open that same file via the file explorer, file opens in Ps and the script runs successfully (Welcome.jsx).

Question: Isn’t it possible to run the script/action when a file is open via UXP plugin? What changes from opening via file explorer or via UXP?

On our UXP plugin we open a file entry:

      const fileName = `image.jpeg`;
      const mediaFileEntry = await myFolder.createFile(fileName);
      await mediaFileEntry.write(mediaFile, { format: storage.formats.binary });
      await app.open(mediaFileEntry);

Thanks in advance,