DNS query uses port 53 and ping does not use any port but uses icmp and ip address.
If you want to ping the host name of the router it will require to have a hostname resolved to an ip address first.
For that you might specify the ip address of the router in your computer DNS settings.
But ping uses icmp requests with no ports so you cannot resolve the DNS hostname to ip address on port 53.
Thus, you cannot ping the router's host name directly from pc connected to wan port.
If you still want to ping the router's hostname from wan network use a router in between, and open port 53 under firewall > traffic rules > add New Instance, on router that you want to ping.
And both routers should have WAN to WAN connectivity with routes established between them.
Firewall settings should look like.
Source zone: WAN
Dest Zone: Device Input
Dest port: 53
Rest all settings default.
And for WAN to WAN connectivity refer to config examples under image.
Note: Specify the wan ip of the router that you want to ping as DNS server ip on your computer.
Config for Router 1:
Config for Router 2:
BGP routes should look like this under: WEBUI > Status > Dynamic routes
For Router 1:
For Router 2: