I get the error "Unexpected key ‘UsernameConfiguration’" when add trigger to existing user pool

I get the same error as described in

I created a User Pool with AWS CDK and want now add a trigger to this existing user pool.

sls version
Framework Core: 1.61.3
Plugin: 3.2.7
SDK: 2.3.0
Components Core: 1.1.2
Components CLI: 1.4.0

I get the error
Failed to create resource. Unexpected key ‘UsernameConfiguration’ found in params

I define the function with

    insertUser:
    handler: src/insertUser.handler
    memorySize: 128
    events:
       - cognitoUserPool:
           pool: userpool-${self:provider.stage}
           trigger: PostConfirmation
           existing: true

What can I do to make this work?
I think I should have the fix in my version as it is from March.