The background color passes through foreground in Affinity Designer if the outline (border) stroke is "Align stroke to outside". It is barely visible, but it is there. If I change the stroke to be centered or on the inside, the pink line disappear. However I need the outline to be aligned to outside the path in order to get my masking correct. Is this is a bug in Affinity Designer, or am I doing something wrong?
Your own fix isn't unnecessary. Virtually all vector drawing programs make perfectly fitting seams partially transparent when the image is rendered to raster displays- it's anti-aliasing. An alternative is jagged edges.
Illustrator can avoid it, but it has had a long time to grow. Make a SVG export from Illustrator to another software and there the problem is again. Low selected SVG export numerical precision can make it worse.
There's no other solution than have something not-offending above or under the seam. Overlapping shapes or strokes are common solutions.