Modal dialog freezes with endless loading on Windows

I am getting a very strange behaviour.
Windows 11, Adobe Photoshop 23.1.0

I am calling Levels adjustment layer dialog via UXP with following code:

const showLevels = async () => {
  await batchPlay([
          _obj: "levels",
          presetKind: {
            _enum: "presetKindType",
            _value: "presetKindDefault",
          _options: {
            dialogOptions: "display",

 async (executionContext, descriptor) => {
        let hostControl = executionContext.hostControl
        let documentID = forceDocumentId || (await
        let suspensionID = await hostControl.suspendHistory({
          documentID: documentID,
          name: history,
        l.log("Suspended", history)
        await showLevels()
        await hostControl.resumeHistory(suspensionID)
        l.log("Unsuspended", history)

If Preview flag is on in the dialog, moving any slider in Levels results in an endless loading as if control was not returned after suspension. Same happens with Curves adjustment.
If I grab the slider and move it around, I can see how Levels are applied in the background with no delays, under the endless loading popup.
This doesn’t happen on MacOS.

If instead of invoking Levels dialog with UXP code I just do manually Image => Adjustments => Levels everything is working fine.

Having reproduced the problem also on MacOS and with development mode on, there are no errors or any other messages in console when the freeze happens.

I think this is related to Prevent Progress Dialog When Using ExecuteAsModal - #8 by tomzag

Yes, looks like the same problem. Really breaks the functionality for me at the moment. Hope the fix is coming.