I do not use KaText but did bump into it because of the ChatGPT output.
It may be that the site you are using does not expect the bookends.
Using KaTeX Live Demo with Chrome this is what I see
\[ \nabla \cdot \mathbf {E} = \frac {\rho} {\varepsilon_0} \]
Using https://katex.org/ with Chrome
With bookends
Without bookends