What should I do about a character’s magic items when their player leaves?

I have a group of three adventurers and one member of the party is leaving the group permanently. No worries, it’s all on good terms and we’re getting someone else to replace them. My concern is that my group can be fairly volatile, meaning that players come and go somewhat frequently, and I’m not sure what the best way would be to handle their magic items. I could just allow the remaining players to pick through the magic items that belonged to the player who is leaving, but that could cause balance issues if my player count dwindles and they are loaded with unnecessary magic items. Not to mention it doesn’t really make sense for a character to just give up all of their most valuable possessions just because they are retiring from adventuring. On the other hand, I don’t think it would be right for me to rob the party of the hard earned loot that they ALL risk their hides for. Does anyone know if there are guidelines for this scenario, or do you have any advice?