Synchronously perform executeAsModal on every layer from activeLayers array

Wrap everything in execModal. You can also have execModal inside execModal. So I think this should be enough:

await core.executeAsModal(
  handleExecution,
  { commandName: "Creating a transformed layer..." }
)