Ok. So if you open assembly and show "this works" configuration you'll see SW handling ZTG geometry because when Part2 is extruded (feature "this works") there is ZTG created when it passes by Part1. Therefore the cavity function should have failed, but it didn't. Yeah!
Now change to "This doesn't" and you'll see I added a contoured parting line and a radius to Part1. In Part2 you'll see I suppressed the original boss and cavity features because they don't work anymore. I added "This doesn't" and "Cavity2" features. You'll notice in Sketch4 of "this doesn't that there are 2 splines. 1 is a converted edge and 1 is an offset of that converted edge. The converted edge is the silhouette "Split Line1" of the Part1.
So the only reason "this doesn't" configuration is working is because of the offset edge. Play with the value of offset and you'll see there's a point at which it stops working.