This is not resolved issue.
This is still affecting current version 1.21.81, only with UI profile “Pocket”, not “Classic”.
Still gotta resort to throwing items out or filling up my hotbar completely in creative, which is a pain.
I can confirm it for 1.21.4.
Update on this:
It does it whenever I open the game and even on texture packs