Historically, transfinite surfaces and volumes do not play well with FEniCS, ref:
The key thing to check is that if all the nodes, describing the facets of the mesh is part of the volume mesh, as done in: Fail to read tagged facets from mesh generated with GMSH - #2 by dokken
i.e. do something along the lines of:
line_vertices = np.unique(line_mesh.cells_dict["line"].flatten())
triangle_vertices = np.unique(triangle_mesh.cells_dict["triangle"].flatten())
print(line_vertices)
print(triangle_vertices)
print(np.isin(line_vertices, triangle_vertices))
just with tetrahedra and triangles.