Playing a Photoshop action via (UXP) JavaScript: Dialogs are freezing

The code I figured out works fine for simple actions.
However, if an an action contains dialogs, it becomes unusable.

For example, if the action contains a Gaussian blur (with dialog),
the UXP progress bar appears and the Gaussian blur dialog freezes -
it is almost impossible to move the slider and also the preview does not
work correctly.
The situation becomes even worse if the action contains further dialogs.

Here is my code:

const app = require('photoshop').app;
const executeAsModal = require('photoshop').core.executeAsModal;

async function playAction(aName,aSetName){
  const actionSet=app.actionTree.find(as=>as.name===aSetName);
  const action=actionSet?actionSet.actions.find(a=>a.name===aName):null;
  if( action==null ){
     throw `Action not found:${aName} / ${aSetName}`;
  }
  await executeAsModal( async()=>{
      action.play();
  },{'commandName':'Play action bla bla...'});
}

Is there a way to solve this problem? Or am I missing an important step?

Thanks.

P.S. I also used Alchemist to figure out the batch play code needed to play an action, but the
same problem ocurs.

I just realized that the same problem arises if a filter is executed via batch play like this:

await executeAsModal(async()=>{
    const result = await batchPlay(
      [
         {
            _obj: "gaussianBlur",
            radius: {
               _unit: "pixelsUnit",
               _value: 3
            },
            _options: {
               dialogOptions: "display"
            }
         }
      ],{
         synchronousExecution: false,
         modalBehavior: "wait"
      });
  },{'commandName':'Blur it!'});
}

Same behavior: The dialog of the Gaussian blur filter is shown, but as soon
as the slider is moved, the progress bar appears and the dialog becomes unusable.

Yet another remark: This seems to be a new “feature” in PS 23.1.
When I roll back to PS 23.0.2 everything works fine.

Have you tried removing modalBehavior: "wait"?
Also, in many cases it’s not the best idea to directly bind slider inputs to Photoshop operations. Those operations might take a few ms and dragging a slider fires multiple times in a very short period, resulting in Photoshop not being able to catch up.

No difference.

But my real problem is with Photoshop actions. I simply wanted to have some buttons in a panel
which can be used in order to start an action.
This works fine, if the action has no dialogs, but for many actions it is essential to let the user interact with the settings of a filter or an adjustment layer.

Probably I did not describe it correclty: Within the action a filter (e.g. Gaussian blur) is used in interactive mode. The dialog of the Gaussian blur filter freezes - not any slider within the UI of my panel.