Upgrading Drives

I have a My Cloud EX2 with 2x 2TB drives in a RAID 1. To gain more capacity, can I swap one of the drives out for a 4TB and, following a rebuild, swap the other 2TB out for another 4TB? At the conclusion of both swaps and both rebuilds, I would have 2x 4TB. Will this work, or do both drives have to be of identical capacity?

My apologies if this has been posted before. I couldn’t find an answer.