The VPN catches all network traffic and puts it far away - you can’t be on vpn and see local network resources (casting targets) at the same time.
If your vpn has an app, check your settings for something like “local network access”.
Otherwise, start reading about split-tunnels and/or default gateways