A duplicate name can only happen when changing the name to one already used by a different category.
curl --location --request PUT '/tags/categories/1' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Marketing",
"order": 1
}'{
"tagCategoryId": 1,
"name": "Marketing",
"order": 1
}