Password Policy - not username is not enforced via API

Hi,

I configured to Password Policy with policy type “Not Username”.
when creating user via the UI console the policy is enforced.
when I create user / reset password ,with password same as user name, the user is created successfully.

APIs:
admin/realms/{realm}/users/{id}/reset-password
admin/realms/{realm}/users

Server Version- 7.0.1

Please advice