You don’t need to have two separate Shapes. Just one will do:
grid: new go.Panel("Grid", { gridCellSize: new go.Size(20, 20) })
.add(
new go.Shape("LineH", { strokeWidth: 0.75, strokeDashArray: [0.75, 19.25] })
),
By the way, GraphObjects are visible by default, and Shape.strokeWidth is 1 by default. Also, there’s no need for repeating zeros in the Shape.strokeDashArray.