I believe this is unintended, so that's why I'm calling it a bug. Doesn't seem to have been reported before. Reproducing it is pretty simple. Switch to Creative Mode and in the inventory hold LMB anywhere on the screen, hover over, for example, the Building Blocks tab and release LMB. For some reason this counts as a click and it switches to the tab.
While this isn't a serious issue, it's a mild inconvenience. When I'm scrolling through the Search Items tab I accidentally press Survival Inventory.
Linked issues
Comments 2
Duplicates MC-179165
Can confirm.