The problem is that just like clubs everything you use during a round of golf must be contained in your bag at the start of the game. If you get a shirt from the pro shop half way round ,and put it on,you are technically breaking the rules
normally you are not allowed to do anything except have a quick pee and return to the game. It's not the fact that the shirt was changed ( as it was in the bag at the start of the competition) it's whether it should have been changed on the course and not in the clubhouse. Therefore getting out of the rain while changing, does that constitute an unfair advantage ?