Race condition in online plotting with Makie

Because of the synchronous update of the Observables, this usually happens. The way around it is to pass an observable vector of points, in your case:

points1 = lift(i->Point2f0.(view(x, 1:i), view(y, 1:i)), ii)
points2 = lift(i->Point2f0.(view(x, 1:i), view(y2, 1:i)), ii)
lines!(axs[1], points1)
lines!(axs[2], points2)

This line is unnecessary:

Makie.update!(scene)