All NetworkManager connections, including Wireguard tunnels, are stored in /etc/NetworkManager/system-connections. Find the .nmconnection file that relates to your VPN connection. Under the [wireguard-peer.{{KEY}}] stanza, you can add persistent-keepalive=25. After saving the file, do a nmcli connection reload. The only thing I can't say for sure is of Cockpit will keep that directive if you edit there later.