Fix rot90 for non-square arrays in TensorFlow backend (#23435)