You fix the canonical issue by using the proper canonical for the page.
The solution will depend on how your site is constructed and possibly your skills at programming.
If it is a site designed by hand you include following html code on the page.
<link rel="canonical" href="https://example.com/dresses/green-dresses" />
If you created the site with WordPress, then use a plugin.
Each situation is different.