Masonry.js, issue with collection sorting order

Hi, I’m using this code on a website, I’m facing a problem with loading the code, randomly the elements of the gallery overlap (screenshot attached)

This problem is mainly present in Firefox and Chrome, in Safari for example it does not seem to be present at all,
can anyone help with this?

here is the link of the page I’m trying to fix:
https://unica-a51bae.webflow.io/architecture-category/all

many thanks