Casting content from a device connected to our VPN to a device not connected to our VPN (e.g. Chromecast) is basically not supported. This is the case because the device connected to our VPN uses a different IP address, namely the IP address of the selected VPN server. The Chromecast uses your 'normal' IP address.
The devices you connect to with Wi-Fi are connected to each other over your router's network. As soon as you turn on a VPN, the device you use is in a Virtual Private Network and no longer on your router's network that other other devices use. This is why they are no longer visible when the VPN is enabled.
However, it is possible to cast the content from your Android device directly (mirroring actually) to your Chromecast. Then the entire screen of your Android device is shared.