Try using Tilemaps, see the documentation in the editor about TileMap and TileSet to see all their methods. You can change the texture of each cell or keep the same by changing the color by modulating, deleting, collisions, etc. To detect each cell with the mouse you can use its collisions or by position proximity. For the continuity of the selection with the mouse you can use a popular algorithm:
I created an empty tilemap with very small cells (4x4 pixel, no collision), and the drawing is fast.
Although to avoid empty spaces you have to use the algorithm that I mentioned above or perhaps use a linear interpolation between each position of the mouse.