I am doing research on the protected areas of the Amazon rainforest and I need to create a single polygon layer that has all the forested non-protected areas in one attribute row. I have tried using different polygonise functions in QGIS with different dissolve functions and fixing geometries, but I always end up with the same final layer which has invalid geometry.
After polygonising the raster and saving the forested areas, I have a multipolygon layer (with thousands of rows in the attribute table) which looks like what I wish to achieve:
However, when I try to dissolve the layer into a single polygon layer (with SAGA Polygon Dissolve (all polygons), but the same happens with GDAL Dissolve), I get these polygons within polygons:
(This is just one area, not the whole layer, showing the areas that appear after trying to dissolve the multipolygon layer)
I've tried to use "Fix geometries", but that only removed some of the unwanted areas (the fixed image is included here).
I have tried to fix this problem for more than a week now and am running out of options to try.
Edit: I am running 3.2.0-Bonn on Windows 10. My GDAL/OGR version is 2.2.4 and I use WGS84 as my CRS.