It's a simpler answer than that. That nitrogen is already using one p-orbital to pi-bond (that's how pi-bonding works - sideways overlap between co-planar p-orbitals). So the lone pair must be in another p orbital that is orthogonal to the one already being used for pi-bonding. Therefore, it cannot delocalize because it does not have the right geometry, i.e. it's not co-planar with the p-orbitals of the pi system.