"Remove all commits" when a commit added is not working after adding a new commit

I’m currently facing an issue with GitLab merge requests in self-hosted gitlab.

Description of the Problem:

  • “Remove all commits” when a commit added is not working after adding a new commit.

Steps to Reproduce:

  1. Create a branch
  2. Create a commit
  3. Approved it
  4. Create a commit to the same branch

Expected Behavior:

  • The MR approves should be deleted

Actual Behavior:

  • The MR approves are not deleted after adding a new commit.

Additional Information:

  • Gitlab version is v16.7.3-ee
  • Gitlab plan is Ultimate