I expect the rank to be 4.
I already see it is not.
True rank is 2. There are only two independent row vectors in the matrix. There are only two independent column vectors in the matrix.