DNS not working in Bash (Ubuntu) on Windows using VPN

It's a routing problem, not a bug of WSL. It's very likely that your local subnet is the same as the remote subnet. And I assume you use the bridged VPN.

I have encountered the same issue. I use OpenVPN to connect my office(remote) and my home(local). The two subnets are both 192.168.1.0, which is the most common one where you would find on many routers.

I eventually resolved the issue with the following config. My goal is to use tun in order to reduce overhead and only redirect the traffic where the destination is at the office. However, this would also work with the bridged VPN.

;make the dhcp-option works on Windows 10.
script-security 2
;do not accept any pushed route command.
route-nopull
;make sure the connection still go through my home router. This line may not be necessary. You can try to remove this line and see it the VPN works.
route 192.168.1.1 255.255.255.0 net_gateway
;redirect the traffic where the destination is within the 192.168.1.0 subnet to OpenVPN gateway.
route 192.168.1.128 255.255.255.128
route 192.168.1.0 255.255.255.128
;set the DNS server which is in the office
dhcp-option DNS 192.168.1.254
dhcp-option DNS 192.168.1.253
dhcp-option DOMAIN my.company.domain