They add cost, doesn’t matter if it is set to 0 opacity.
The amount of cost depends on the material and whether it is masked or translucent, the lighting mode, whether or not you are evaluating masked only in the early depth pass, whether it’s a Nanite mesh, how many layers of translucency there are, the material graph, and so on and so forth.