It's done by copying screen memory back onto itself with an offset rather than simply clearing each frame (feel free to download the .p8 source for more detail).