I'm not sure how exactly you're painting your grid, but one way to do it might be to paint the grid with a projector.
You can tell a projector to ignore the default layer, and then you could set any gameobject you want to project the grid onto to a different layer.
↧