@Umetsu I believe that's correct. In the previous chapters I'm pretty sure it was the case that on switching, his outfit would be changed to the magical girl outfit, so his male clothes would become female. And on switching back, ONLY the clothes that he switched to would be switched back.
So since he's wearing a uniform that wasn't from the switch, he had to take that off (to not tear it like the dress he tried on), but the underwear was just going to go back to his normal underwear after, since that was from the transformation itself.