That's what happened, almost exactly, to my Aunt's 03 with around 158k miles on it. The shop replaced the transmission case, and "rebuilt" the componants out of the old one, and then installed it into a new case... 6k miles later, it lost 4th gear and the check transmission light was flashing... Had codes for the shift solonoid... The shop huffed and puffed about how it's got electrical gremlins and a blinker bulb could cause that and bla bla bla. They removed the transmission, and upon disassembly, found the 4th gear band had failed (showed me broken parts, but they had tool marks so who knows if it broke upon disassembly or in service)... Picked it up 3 weeks later (after being told it would be done by the end of the day, for about 2 weeks running) 8 miles later, exact same symptoms. no 4th gear flashing check transmission light, and codes for solonoid... More huffing and puffing. Some vulgartitys exchanged. Left truck and keys with explicit instructions to not call until it can make a 20 mile drive successfully. Another month later, get called and say the shift solenoid failed. That's weird....... Hmmmmmmmm..... They replaced it, and it's been fine for the last 200 miles.
Kinda wonder if the shift solonoid malfunctioning caused the 4th gear band to overheat, disconnect, and exit the transmission case assembly... But hey, what do I know. "Your just some young buck who thinks you know more than me. I have probably forgotten more than you will ever know"
Better stop, because my blood pressure is raising...