I also have the same issue and have already factory reset the device 2 times with no joy, it is a Samsung tab E .
As the person in original post, everything else works perfectly and WiFi works perfectly in safe mode.
If not in safe mode WiFi will only stay on for between 5 seconds and up to...