I posted a ground grid shader as an answer to a forum member in another thread. Since that thread has a totally unrelated title, I'm posting a polished version of the shader here to make it easier to find. There are several grid shaders on godotshaders.com but I couldn't find one that actually does it properly.
It's an infinite projective grid with uniform line width, similar to what we have in most 3D apps, easily customizable, can render a grid and/or a checkerboard. I've also attached a demo project below.
Hope you find it helpful.