Hi there! Tawny from Moz's Customer Support team here.
That's an excellent question! Our tool has a 90% tolerance for duplicate content, which means it will flag any content that has 90% of the same code between pages. This includes all the source code on the page and not just the viewable text, so often it's a matter of finding the best answer for the duplicate pages in question.
For instance, often with ecommerce sites, product pages will come up with duplicate content between two colors of the same item, and in that case it's good to use the canonical tag. https://moz.com/learn/seo/canonicalization
If there are two versions of the site that exist - for instance, example.com/subfolder and www.example.com/subfolder - you can put in 301 redirects to the correct page: https://moz.com/learn/seo/redirection.
If it's just two pages on different subjects but thin content, filling out that content with an extra paragraph or two can help. 
There are more in-depth explanations of common answers to duplicate content on this page, if you're curious!: https://moz.com/learn/seo/duplicate-content
Moz's tools won't take Google Tag Manager into account - you could still see duplicate content errors pop up. Using canonicalization or redirection should help cut down on those errors, though!