Please note that "Snap Vector Tools and Transforms to Pixel Grid" already enabled and I did so much search before I post this. I use Photoshop CC 2014.
First I created a square 400X400 and I duplicate this square
Then I placed the duplicated square under the first one
And then when I transform them both 45° I get this space between them
So how I get rid of this space?