How to configure an openvpn server that works with 2 wan?

Hello community, I currently have a CCR1009-7G-1C-1S+ that has an OpenVPN server configured, the router has 2 WANs configured in Failover, OpenVPN its certificate is signed with the main WAN but when that WAN does not work the VPN service also works it stops working. Could someone guide me on how to configure OpenVPN so that it works with failover and is functional when necessary with the secondary WAN?