load this file. I'm using AE 24.6.2 build 2 on windows 10.
At half resolution the top shape correctly masks the bottom one, and it's invisible.

Switch to full resolution and suddenly it's visible

Move the mask 0.01 pixels vertically in either direction and it works again.

Gonna say....it's a bug! And it broke my renders and I have a deadline 😅