… despite the ESP’s still remaining connected to the AP, try this. In your AP controller (wireless networks setting) you will probably have your Minimum Data Rate Control setting on auto. I’ve been struggling with this availability issue (note - this is only if you use BLE on your ESP otherwise I had no issues) for a week now. Previously all was ok.
I turned the setting off and set it to the minimum and as you’d expect many devices won’t like this and start complaining. But then I set it back to auto after that and everything went back to normal - ESPs always show as online now.
I have no idea why - perhaps some corruption on the actual settings that was cleared by doing this. Anyway try this to see if it might work for you.