You bought the right size. It came out of the first wash a size smaller, shorter in the body, and now it rides up when you lift your arms.
Cotton shrinking is not a defect and it is not really the fibre's fault. It is tension being released — and once you know where that tension came from, most of it is avoidable.