How to avoid or repair non-manifold edge when using vtkClipDataSet?

I am using vtkClipDataSet to clip unstructured grid composed of vtkPolyhedron. The first time of clipping is always perfect, but the second time or more sometimes generate warning such as non-manifold edge. How to avoid or repair non-manifold edges?

Here is my code:

# temp_grid is unstructured grid composed of vtkPolyhedron.
# the origin shape of temp_grid is cube, I want to clip it twice.
# generate_plane is a function to generate vtkPlane.
clipper = vtkClipDataSet()
clipper.SetInputData(temp_grid) 
clipper.SetClipFunction(generate_plane(1)) 
clipper.InsideOutOn()
clipper.Update()
temp_grid: vtkUnstructuredGrid = clipper.GetOutput()

clipper = vtkClipDataSet()
clipper.SetInputData(temp_grid)
clipper.SetClipFunction(generate_plane(2))
clipper.InsideOutOn()
clipper.Update()
temp_grid: vtkUnstructuredGrid = clipper.GetOutput()

Here is the output in console:

2022-09-05 16:22:19.223 (   0.057s) [          935C43]      vtkPolyhedron.cxx:1373  WARN| The polyhedron is not watertight or non-manifold because the number of faces of edge 87-88 is not 2 but 1
2022-09-05 16:22:19.223 (   0.057s) [          935C43]      vtkPolyhedron.cxx:1373  WARN| The polyhedron is not watertight or non-manifold because the number of faces of edge 86-87 is not 2 but 1
2022-09-05 16:22:19.223 (   0.057s) [          935C43]      vtkPolyhedron.cxx:1373  WARN| The polyhedron is not watertight or non-manifold because the number of faces of edge 90-89 is not 2 but 1
2022-09-05 16:22:19.223 (   0.057s) [          935C43]      vtkPolyhedron.cxx:1373  WARN| The polyhedron is not watertight or non-manifold because the number of faces of edge 89-86 is not 2 but 1
.........

Thanks for your help.