I ran into this issue 3 times already. T mobile tech support was awesome with the help. Each time it happen either I was texting or checking mail. It could be firmware. I never experience it on my s6.
I had the same problem with AT&T. Go to setup and make sure your Data is still enable when it switches to WIFI. The AT&T Tech explain to me. They don't play nice. If you still have the same problem turn the airport mode on and then off. But make sure the Data is still enable after you turn...