Item Modifier: no_custom_name.json
{
"function": "set_components",
"components": {
"!minecraft:custom_name": {}
}
}
Using this item modifier, it is not possible to remove a custom name from an item.
1. Try give yourself an item with a custom name:
/give @p stick[custom_name='"Custom"']
2. Try to delete the custom name
/item modify entity @s weapon.mainhand test:no_custom_name
3. No error, it succeeds. But the name remains.
(relates to: MC-128225, perhaps?)
Related issues
relates to
Attachments
Comments

Please attach the datapack used to reproduce this issue

The attached item modifier should suffice no?
No, we need a complete minimal setup datapack, not something we have to create ourselves.

It seems this happens also for the `custom_data` component.

Datapack has been attached. for convenience sake.