Pressing a Hotbar select key (1-9) and the drop key (Q) on the same tick will cause the item previously selected to drop but appear to remain in your Hotbar. The item you just switched to will enter a ghost state and remain invisible both in your Hotbar and your inventory until you press drop item (Q) on the empty slot. Dropping the item that is actually on the ground but still appears in your Hotbar will cause it to disappear.
Thank you for your report!
We're tracking this issue in MC-154881, 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
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki