Why sometimes Wireguard interface need to manually connect?

Hello,I have a problmes during use Wireguard VPN in the openwrt router.
Sometime wireguard VPN interface lost handshake with sever.I need to go to luci ,Network → Interface,and then manually click CONNECT ,after I clicked CONNECT button,VPN tunntel working back as ussaual.
Can you help ?Thank you very much.

Yes,My main router have two local ISP WAN . main router have loading blacing policy.So maybe sometimes local ISP's IP will auto change.

Yes, and if that is the case, the wireguard watchdog should do help.

By the way,How to modify this script below (Because I have multiple wireguard interface,I have to monitor all interface at the same time.

while [[ $tries -lt 3 ]]
    if /bin/ping -c 1
        logger -t "wg-watchdog" "wireguard working"
        exit 0
systemctl restart wg-quick@wg0
logger -t "wg-watchdog" "wireguard restarted"