I used the following code to draw a grid, and to fill certain cells with certain fills or shapes.

```
    \documentclass{article}
    \usepackage{tikz}
    \usetikzlibrary{calc,shapes}
    \begin{document}
    \tikzset{
      pics/square/.default={1.5},
      pics/square/.style = {
        code = {
        \draw[pic actions] (0,0) rectangle (#1,#1);
    }}}    
    \begin{center}
    \begin{tikzpicture}
    \foreach \x in {1,2,...,5}  {
     \foreach \y in {1,2,...,5} {
       \pic[fill=white] at (\x,\y) {square};
     }
   }

    \node[regular polygon,regular polygon sides=4,draw=black,thick, fill=blue,minimum size=.8cm] at (5.5,4.5) {};
    \pic[draw=black,thick,fill=red] at (2,2) {square};
    \end{tikzpicture}
    \end{center}
    \end{document}

```

When I used the code

```
pics/square/.default={1},

```

I got a square grid.

[![enter image description here](https://i.stack.imgur.com/ml1Xm.png)](https://i.stack.imgur.com/ml1Xm.png)

But when I used the code

```
pics/square/.default={1.5},

```

to get a larger grid size, the grid became rectangles not squares.

[![enter image description here](https://i.stack.imgur.com/xiEhn.png)](https://i.stack.imgur.com/xiEhn.png)

How can this be fixed by increasing the default grid size, without increasing the scale of the `\tikzpicture`.