3D heatmap sectional plane and stencil test

Code is https://codepen.io/wangjia184/pen/jOdQGOV.

I have made a 3D heatmap using three.js.
I am trying to show sectional plane, but as you see, in both ends there are some issues. How should I fix that?

What about adding a ring of additional vertices around the plane geometry, like the blue ones in the illustration? Then just move these extra vertices towards ground zero – this will close the openings.

I used a similar approach here:

https://codepen.io/boytchev/full/mdaKJQR

image