If you resize it and you want to hit an even number for the square, like 2x2, 4x4 etc, you will have to release it while you have dragged it about halfway into a square, not when reaching the borders, that way you can only do the odd numbers.
So if you start with 1x1, and then drag it half a square down and to the right for example, it will be 2x2 (since you added 0.5 squares to the lower and right and 0.5 to the upper and left borders for a total of +1 each making it 2x2) and will snap to the grid.
If you want to reach 6x6 you will have to drag it 2.5 squares like this instead (so you add 5 total to the 1 you already have).
Alternatively drag it 0.5 first, to make it 2x2 like described above, then you can more easily resize it and it will in fact line up to 6x6.
I admit its a bit weird, and I really would prefer an option where it keeps anchored like it is and resizes only the corner i grab. It would make resizing much easier and smoother.
Also it's how pretty much every application handles resizing so most people are actually used to it working like that.