Error err_address_unreachable when reconnecting clients to the network

I found that if I reconnect my phone to WiFi and try to log in to http://<HAip>:8123, I get the error err_address_unreachable. This error occurs in any browser on the device and in the HA application.

But if I ping from HA to the IP address of the device (for example, via Terminal or Node-Red), the device starts to log in to http://<HAip>:8123 until I reconnect it to the network again.

For now, I have found a solution to issue static IP addresses and ping my devices via Node-Red to automatically solve this problem.

Maybe you know how to solve this correctly?

Versions:

HA:
* Core 2024.6.3
* Supervisor 2024.06.0 

OS:
* Debian 11 (Linux 5.4.125)