{
synchronousExecution: false,
modalBehavior: "fail"
}
in API 2 you need to set modalBehavior to “execute” or just leave it empty like this {}
check this
also you need to run the functions “executeAsModal” check this executeAsModal example