This is a duplicate bug report since the last one was incorrectly put into "Resolved" (https://bugs.mojang.com/browse/MC-267605) even though I specified that it also happened in current versions. Here is the bug:
When placing a piston facing up with a block on top then powering that block from above with a button ON TOP (putting the button on the side of the block won't create the bug), the piston will push the block up, but the block will be invisible during its movement. This is not a visual bug. If the pushed block is a slime and you stand on it, you will not be launched up since the slime is technically not there. Also, this bug does not occur with levers (as shown in the video), and works slightly differently with pressure plates. This bug is present in ALL versions/snapshots after 1.18.2, which includes current versions.
Still happens as of 26.3 Snapshot 10.
Some things to note:
This also happens with the following blocks, so long as they activate the piston (by providing power or completing the circuit) immediately as they are placed:
Repeaters (to extend a signal)
Comparators (to extend a signal or read a full container)
Tripwire Hooks (when placed while something is activating the tripwire)
Tripwires/String (when placed while anything is standing in a connected tripwire; when the to-be-pushed tripwire or one connected and adjacent to it is broken by hand)
Redstone Torches (to send a signal; wall or floor)
Redstone dust (to complete a circuit)
In a similar way, if the circuit is completed with a solid block (either a redstone block, or passing the signal through a solid block), then the block that pushes it temporarily appears to be replaced by that block, rather than turning invisible.
This can happen with sideways or downward pistons as well. However, the piston needs to push something into the power source; a button that breaks due to lack of support won’t cause it.
If the piston pushes directly into the source without pushing any blocks, the piston head is made invisible.
If a long line of blocks is pushed into the source, including something connected by slime blocks, the block that destroys the source is made invisible.
It seems this only happens if the source is placed/activated/broken by hand. Using projectiles (for buttons), pistons, or commands to break/place won't cause the glitch.
Placing/activating the source while ticks are frozen also won't work.
Apart from tripwires, if the piston is powered by a source other than the one it is destroying, it won't occur.
This works with all types of buttons.
If the piston rapidly moves back and forth — such as by doing it with a redstone torch and immediately replacing it when broken — then it won’t happen consistently.
If they are placed before they're given power (repeaters before being given power, or comparators without a container to read), or in a way that doesn't activate the piston immediately (placing a redstone torch before the redstone line is connected to the piston, or delaying the signal using repeaters), then it won't happen.
Pressure plates did not seem to produce this effect, even when standing on the plate while placing it.
I attempted this with levers, observers, detector rails, lightning rods, and target blocks as well, but was unable to reproduce the effect.
Some videos:
Occurring from other piston orientations: https://youtu.be/vXaxEBbJFTE
Occurring when using honey blocks: https://youtu.be/Mx6BDqDWhSQ
Occurring with things other than buttons: https://youtu.be/ukLhsiXIzfA