Scale along Z-axis only
As far as I know object scale can only be done along its own axis (X, Y and Z).

So if we have this cube orientation (rotated 45 degrees around Y for instance):



it cannot be scaled in the global Z axis only.

That's why we have this result:



So to obtain the wanted diamong shape, you need to either:


Apply rotation CtrlA and choose 'rotation'. Then scale along global Z:




Or:


Enter edit mode, then scale along global Z: