Notebook is rendered in a virtualized list in the core and when you are scrolling the document, cells are inserted and removed based on the scrolling position and viewport. If you edited a code cell and scroll to other places in the document and then scroll back, you would expect the code cell is in the same sate as before.
Currently it's not:
