Hello Jack.
you are right, no need to panic lol.
The difference was not because of the document.querySelectorAll in place of the gsap.utils.toArray
The major thing that cleared up stuff was the declaration of the boxes array inside the forEach instead of outside it.
At the point of this morning I did not know why it worked, but as you can see Zach already cleared up both points, and now its clearer.