Ip Address of the device isn't reachable after while


I have observed, that sometimes my device isn’t reachable over it’s Ip address. It happend mostly after some hours of connection.
In the routers connected devices list it’s listed then as “inactive”. But also in this case it’s sometimes reachable over it’s ip and sometimes not.

Did somebody has an idea why this happens and how to prevent this case?

Can maybe somebody explain to me, how the router detects the active/inactive information? Did the router usese arp protocoll and the esp doesn’t respond to this?

Thank You very much for help.