Mask art that is all visibility:hidden imports as nothing, and opacity_mask then returned no mask: the object was drawn whole. An empty mask is what the file means (black all over); the renderer and the PDF and SVG exports already draw empty mask art by its clip and invert options.