There is a long-standing bug in the TP-Link integration. This integration appears to have been orphaned; there don’t seem to be any developers working on it.
Probably the longest-running thread on this problem is here:
In summary, the TP-Link “Kasa” app has no trouble seeing these devices, but HA fails and reports “unavailable” any time there’s a minor network disruption or if HA starts before the TP-Link device is connected. From the symptoms, it appears that the HA integration never re-tries the connection, while the Kasa app does.
This issue keeps getting reported in various forms, but it never seems to be addressed.