When I polygonize a raster, I very often have 'pixels' holes/interior ring that touches exterior ring.
An example:
POLYGON((5 0, 10 0, 10 10, 0 10, 0 0, 5 0, 3 3, 5 6, 7 3, 5 0))
It's defined as an invalid geometry in the OGC geometry specifications.
In QGIS, how to fix this?

"DN", I specified it just above the code and it's a field of my layer. It's not useful to fix the polygon geometry but useful to retrieve my layer attributes in the new geometry fixed virtual layer. – J. Monticolo Dec 15 '23 at 09:12