This is definitely software, but still is good to call Apple and report the issue, even have them replace it so it will become more and more noticeable for them due to the cost of replacing so many phones cause by the same problem. This has to be happening to them as well, at my office co-workers have the same problem with their iphones daily. In my case I workaround it by Resetting the Network settings, it always comes back and works just fine afterwards.
Today it happen again and I lost all available Network Connections at the office. I found at a different post to check how frequently the iPhone switches from Wifi N 5Ghz <> LTE <> Wifi bg 2.4Ghz, given that somebody else has found out that when this happens the iPhone reaches a point that it stops updating the Wifi networks and stops looking for them.
Long story short at home wifi flaps when I am across the house so it constantly flaps between N and BG to a point where it loses the Wifi networks (Samsung Galaxy 4 works just fine at the same distance, so for me its just that the antenna in this iPhone s u c k s in terms of range, other devices have the same problem). Same at work, but at work is caused by a problem we have with the Access Points which causes the wifi network to flap constantly.
Last Thursday at home I disabled my BG network and kept using only N, so when the phone is not in range it will switch to LTE and stay there. If I am in range it switches back to N. So far no issues it has been connecting to the N network just fine and when I am out of range it just switches to LTE, but can still look for other networks and when I am in range it connects back to it.
At work well thats a problem of our networking team to have the Access point fixed, but while the Access Point is stable, I have no issues.
Hope this helps for others and if positive results are given then post them here to let others know that might work as a temporary fix. Lets wait and see if Apple will come up with something soon, this type of things that happen since day 1 take time to resolve as they need to check with the provider of the driver, antenna and their code to see what is happening.