When I move tasks, the viewport does't follow the tasks and the tasks get lost.
Move the viewport along with the tasks.
Notion does it perfectly — see the gif.

Photo Viewer

View photos in a modal