Add the following property to the aws-lambda-tools-defaults.json file in the directory where the Lambda function is at:
"code-mount-directory": "../../../"
Please have a look here for further details: https://github.com/aws/aws-extensions-for-dotnet-cli/discussions/332