How to fix duplicate product and video issue after Masonry theme update?

After updating the theme from Masonry 3.11.1 to Masonry 4.0.1, there was a duplicate product on the main page and a duplicate video play button.
Tell me what this can be connected with? And how to get rid of it?

The issue has been resolved. there were errors in the code