If you are using perspective correction software in the "automatic" mode, as in it is using the lens profile for the correction - you may have to switch that mode off. Instead try manual correction if you are going to crop the image. The automatic correction might require an uncropped image. Alternatively you could turn the correction on prior to cropping.
To answer your section question, about a good way to photograph a building like this, I would advise reading up on this previous question/answer: Will a tilt-shift lens solve my 'leaning building' shots?Will a tilt-shift lens solve my 'leaning building' shots?
The "optimal" way would likely be to use a tilt-shift lens, in combination with manual perspective control in post processing. If your composition and vision allows for it, and you really want the building to square up, you could also modify your position to shoot directly at the building instead of from the side - but that is obviously changing the image significantly.