Facing issues with Gitlab merge request via rebase API

Description: We have been encountering an error while rebasing merge requests using the API endpoint specified in the GitLab documentation (Gitlab-version: 16.5). In our use case there is no merge conflict.
Situation: If feature branch is just 1 commit behind and not conflicting with dev branch still getting below error while using URL endpoints
Steps to getting error:
Step-1:
method: PUT
URL: https://project_url.com/api/v4/projects/project_ID/merge_requests/MR_ID/rebase
Step-2:
method: GET
URL: https://project_url.com/api/v4/projects/project_ID/merge_requests/MR_ID?include_rebase_in_progress=true
ERROR: (Error get after running step-2)
“merge_error”: “Rebase failed: Rebase locally, resolve all conflicts, then push the branch.”,

expectation:
→ “merge_error”: none, rebase_in_progress=false
→ there will be no conflict and rebase should happen properly