Amend Commit doesn't work

If I set the Amend flag to true and make a commit, the changes in the worktree are not committed. In addition, a new commit is nevertheless created. Without this flag, the commit works as expected.