Breaking a block while being teleported (via /tp with a command block) won't update the game, but still break the block. This will cause floating items. When you update the surrounding blocks besides the block underneath it, the floating item should drop itself but it stays floating. However, when you restart the world, the destroyed block will reappear. Confirmed with redstone, sand, and rails.
Related issues
Attachments
Comments

[media]
Client/server desync. that's why it's fixing itself to what the server knows when you relog.