2D 'POST_VIEW' drawing with gpu.types.GPUShader(vertex_shader, fragment_shader)
Unlike 3dview, NodeView does not have:

matrix = context.region_data.perspective_matrix


so in the callback one option is to use gpu.matrix.get_projection_matrix(), it looks something like:

def advanced_grid_xy(context, args):

    geom, config = args
    coords, indices = geom.coords, geom.indices

    matrix = gpu.matrix.get_projection_matrix()
    shader = gpu.types.GPUShader(config.grid.vertex_shader, config.grid.fragment_shader)
    batch = batch_for_shader(shader, 'TRIS', {"pos": coords}, indices=indices)

    shader.bind()
    shader.uniform_float("viewProjectionMatrix", matrix)
    ...
    batch.draw(shader)


that works with this vertex_shader

vertex_shader = '''
    in vec2 pos;
    uniform mat4 viewProjectionMatrix;

    void main()
    {
        gl_Position = viewProjectionMatrix * vec4(pos.x, pos.y, 0.0f, 1.0f);
    }

'''


nice.