This is a known limitation: freestyle not influenced by holdout collections.
If you set Holdout as shader material to an object, it works:

Except, one line is missing. This is because majority of the line is hidden. If majority was in front, the entire line would be visible (well, unless the line is cut by another line):

This is also a limitation of Freestyle: Freestyle with occluded objects - freestyle lines bleed into hidden regions. The solution is increasing the geometry (effectively dividing the line into many segments).

If there's too many objects to go for that, you can create a new View Layer, in old View layer disable the holdout collection by clicking on the check-mark icon
, while in new layer make the base collection (the one that should be visible), as the holdout layer. This way on the 2nd view layer what's visible is what you want to cut from the first view layer, which you set in a compositor like this:
