After the demo mode has expired, if you try to place a block, it will disappear from your inventory.
Steps to reproduce:
Create a new demo world
Get yourself a few blocks
Change 'Time' in level.dat_old and level.dat to 120485
Notice that despite a block not actually being placed, it disappears from your inventory on client-side
Expected result:
Blocks that failed to place shouldn't disappear from inventory on client-side
Observed result:
Blocks that failed to place disappear from inventory on client-side
Note:
If you reload the world the items will reappear.
Relates to MC-95720