How do I add a div class to the posts in a filter and not the entire filter element?

I am having some troubles with the Isotope filter gallery, as discussed in my Stackoverflow question here.

As per the first point of the accepted answer, I need to add the class .isotope, to the parent (the .row element) to make it work with URL hashes. Otherwise, it only works when you click on the filter links, as you can try on the live webpage.

Here is the element to which the user told me to add the class:

<div class="isotope row masonry" data-masonry-id="d2546a5a8aed79adf8c0b3b78a16b29f" style="position: relative; height: 969.6px;">

Notice the <div class ="isotope before row masonry bit? That is what I need to add.

However, I can only apply a custom class to the entire Posts element in Elementor. If I do that, it causes the JS to think that it needs to sort the whole grid itself and makes it disappear.

How do I target this specific row element?