Loop scroll has inconsistent behaviour

I had the loop scroll JS script working on my website for a while. Based on this example https://loop-596467.webflow.io/scroll-loop

Recently I updated something and now it has inconsistent behaviour - it jumps, glitches, etc.
Once I publish the site it works perfectly the 1st time, but if I cmd+shift+r and reload the site again it doesn’t work anymore.

(P.S. It was my first webflow project, so things my not be built in the most optimized way. But it was working well before!)


Here is my site Read-Only:
https://preview.webflow.com/preview/silfir-used-to-get-wasted?utm_medium=preview_link&utm_source=designer&utm_content=silfir-used-to-get-wasted&preview=285db1ba1260b939daba99e4eedf4fb2&mode=preview