I would encourage everyone to reach out to to solve this problem. Samsung PLANNED this firmware update to ruin your phone so that you would want to buy a new one.
I called tech support like everyone else. They did nothing. They said they were working on it. For 9 months? Likely not. The bug intentionally disconnects you from WiFi, draining your battery as it searches for a network, and chewing through your data on the cellular networks. If you don't have an unlimited plan, tough luck, but either way. . . the idea is to get you to be frustrated and just go out and buy a new phone. It also causes the phone to get very hot. They don't like that you have kept your phone in good usable condition for so long, and they want you to spend hundreds on a new phone.
That would be a good guess, except for the fact that the issue also appears on tablets that have no phone software. I've had the problem for 2 months on mine, and it is incredibly annoying . It's a fundamental bug in the OS connectivity. My money is on an optimizer that sends tasks to sleep including wifi, and when it wakes up it fails to connect properly and just gives up.
Same problem with Samsung Galaxy Tab S2. It worked correctly after factory reset, then an update caused it to behave as OP described. Research led me to Knox. Went to Settings > Apps > Knox and Force Stopped it (not able to uninstall). My WiFi *immediately* reconnected.
So...went to Settings > Lock Screen and Security > Other Security Settings > Knox Active Protection and *disabled* it. The tablet has been connected ever since. I will follow up if anything changes.