What I expected to happen was...:
The armor switches
What actually happened was...:
The armor that is being switched gets deleted
Steps to Reproduce:
1. Launch Minecraft in 24w34a
2. Put any armor on
3. Right click while holding armor in the hotbar
Linked issues
Comments

Thank you for your report!
We're tracking this issue in MC-275755, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as Fixed. Please check the Fix Version/s field in that ticket to see in which version this behavior was or will be fixed.
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
Duplicate of MC-275755.