The bug
When a rail is placed on top of a gravity block (sand, red sand, concrete powder, gravel), and both the rail and the gravity block are moved at the same time so that the gravity block falls down, the rail both drops and remains floating in the air as a ghost block until that block is updated.
Video demonstrating the issue:
[media]Related issues
is duplicated by
relates to
Attachments
Comments

Can confirm in 20w51a.

Affects 1.17
Can confirm in 1.19 and 22w24a.
[media]