Datapack for minecraft 1.21.X and 1.19.4-1.20.4 that allows you to hide item frames' names when there is a custom named item in them.
This datapack allows you to get a book using /trigger GiveFrameBook
that has two clickable prompts that locks all item frames from being interacted with in a 5x5x5 radius around the player and also hides their floating text names, which is really helpful when using CIT packs, and the second prompt indicates with purple particles all locked item frames in a 10x10x10 radius.
To unlock the item frames, all you have to do is left click it and you should be able to remove the item frame or rotate and change the item.
I created this datapack because the only reliable solution to this for singleplayer was laggy, could be easily tampered with, and was difficult to set up. I wanted to make a streamlined solution to this problem that was not only easy to use, but highly efficient and lag-friendly.