Sorry to revive an old thread, but here is some additional clarity on this topic that I've discovered after struggling with it for a while.
First of all, the reason the OOTB countertop does not obscure these dashed lines is because the solid geometry in that family is set to "not visible" in plan view.... so of course you can see anything below the counter height. This is not ideal for me, so I am looking for a workaround that uses symbolic lines in the cabinet family rather than making the countertop invisible and then adding a masking region like the OOTB family uses.
Second, the workaround mentioned in the posts above (placing dashed lines in a cabinet family on a reference plane above counter height) only works for model lines, not symbolic lines. Any model line drawn in the air above a countertop will of course appear just fine. However, using symbolic lines set to "Draw in Foreground" in the cabinet family only makes the symbolic lines draw on top of things in that one family, not on top of any other family placed above it like a countertop or sink or upper cabinet, etc. This is true even if you put the symbolic lines on a reference plane above the countertop height. These are 2d objects, so Revit does not care how "high" they are. To get around this, you need to make Revit think that the cabinet is taller than the counter. Then, any symbolic lines you draw will appear above the countertop, too.
1) Draw some model lines in the cabinet family above the countertop height (these could be the outline of the cabinet, for instance... or just a single line along the wall side of the cabinet)
2) Hide those model lines by unticking the "visible" checkbox in the properties panel
3) Draw symbolic lines in the cabinet family to your heart's content, and check the "Draw in Foreground" button
4) Load into project. Boom! Now you don't have unsightly 3d model lines showing up in all your 3d views, but you also have symbolic lines that you can set on a dashed subcategory that shows up in only your plan views.
I was hoping to avoid this style of workaround, which is a common way for people to fix visibility issues in Revit families... but unfortunately the "Draw in Foreground" tickbox is not as powerful as I had hoped.