This bug is activated when a server, realm, or offline world will have a lag spike or the device will have a lag spike and makes you double click (or more ) the inventory button and crashes the game, it usually happens when you're in a server, realms, online world host and your internet would delay and causes this bug to activate.
Thanks for checking this!
Related issues
Comments

Thank you for your report!
We're actually already tracking this issue at MCPE-83980, so I will resolve and link this ticket 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:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki