After the 1.21.20 update it is no longer possible to create items that are available in commands like /give but not in the creative inventory.
The "menu_category" property of data-driven items doesn't allow the item to show in commands like /give when its "category" property is set to "none", even when its "is_hidden_in_commands" property is set to false. In previous versions you could just do "category": "commands".
The main issue is that when the category property of the menu_category component is set to none, then the game will ignore the is_hidden_in_commands property and hide the item from commands no matter what.
I have provided a sample behavior pack which contains two items: Admin Sword A and Admin Sword B. The only difference between the two items besides their names is that Admin Sword B has its category set to items, while Admin Sword A has it set to false, but both items should work in commands because both of them have is_hidden_in_commands set to false, but only the Admin Sword B item shows up in commands.
The Admin Sword A item has its menu_category property set to {"category": "none", "is_hidden_in_commands": false}. This should result in it being available in commands, but not in the creative inventory. The namespaced id of this item is bugsample:admin_sword_a.
The Admin Sword B item has its menu_category property set to {"category": "items", "is_hidden_in_commands": false}. This results in it being available in commands but not in the creative inventory. The namespaced id of this item is bugsample:admin_sword_b.
Steps to Reproduce:
1. Add the sample behavior pack.
2. Try to run the command /give @s bugsample:admin_sword_aYou will see that the command gives an error. 3. Try to run the command /give @s bugsample:admin_sword_bYou will see that this command works.
Observed Results:
When the "menu_category" property of the item is set to
{"category": "none", "is_hidden_in_commands": false} the item is not available in commands nor the creative inventory.
The command /give @s bugsample:admin_sword_a does not work and does not give you the "Admin Sword A" item.
Expected Results:
When the "menu_category" property of the item is set to
{"category": "none", "is_hidden_in_commands": false} the item should be available in commands but not the creative inventory. The command /give @s bugsample:admin_sword_a should work and give you the "Admin Sword A" item.
Linked issues
duplicates 1
Attachments
Comments 2

Thank you for your report!
We're tracking this issue in MCPE-177866, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki