The bug
The team option nametagVisibility
does not use the same capitalization as the item "Name Tag". It would have to be nameTagVisibility
.
This affects the command feedback message as well:
commands.team.option.nametagVisibility.success
Nametag visibility for team %s is now "%s"
Nothing changed, nametag visibility is already that value
Can confirm in 23w05a and 1.19.3