From personal experience i am worried that some responses to this type of question could have trouble in the long run.
the behavior does occur in both male and female toddlers of the 2-5 years old range. and in fact there is a YouTuber who vlogs daily with a son about 4 years old... while mom/dad are vloging, he will change his clothes and often be seen in background of vlog going to/from his room and sometimes in a state of undress.... usually his underwear but they will need to be extra vigilant in the editing room just in case there is an accidental child porn clip happening in the background while mom and dad are talking about the blueberry pancakes they had for breakfast... (I really LOLed when they mentioned this happening)
how you handle the behavior can affect the child for the rest of their life due to their brains are learning what is right and wrong while they see your reaction and actions due to this behavior... one mother said "Pick you battles, this isn't one to have a war over" and with the small exception of the risk of a naked kid being posted to youtube, i agree... no harm no foul.
But also be careful to not over indulge. by setting rules the child learns that actions have consequences... one mother had her daughter put the clothes in special hamper placed in the childs room which the mother then placed the clothes back into childs closet and drawers... this is extra work for the mother. if you set rule that the child must put away the removed clean clothes (as another mother mentioned that she did) then the child learns that removing clean clothes has the extra work of putting in their correct place for the next time they want to wear them.
I learned from my father that every tool had a place to be and so if i used a tool without putting it back i got yelled at, (but it was ok if i put it back when done) I also learned that if my mother asked me to do something that she would ask a couple times and then do it herself when i didn't... (still don't like to clean my room, but mom isn't here to do it) :(
don't forget to have the tyke help wash their slightly worn clothes too.
when they see that their clothes washing is twice or three times as much due to clean clothes in dirty hamper they will notice they can play more if they change clothes less.
and finally, think about having the tyke "come with" the next time you go to buy clothes... even go to the thrift shop, money to a good cause while the kid gets to say what clothes he will wear. Granted you likely will not find "Sabbath worthy" good clothes at a thrift shop, but for play clothes you will be able to say "you wanted it" and the clothes sizer will be there to be sure that the shirt/pants or skirt/blouse/dress "fits" (or slightly larger for "grow into room")
the extra input may seem a bother but it is more time with your child and their behavior just might be because they want more time with you... they are your pride and joy, why not let them know that you value their opinion, and later when you choose to battle they have experiences where listened to them so they will be more likely to let the battle rest for a better time.