Vpns and casting create a complicated network situation sometimes. Without being able to see exactly what was going on, it can be difficult to tell what’s happening.
Sometimes casting involves sending the data from the controller, your laptop, to the renderer, your TV. That means you laptop pulls the data down and then forwards it.
Sometimes it involves telling the renderer how to get the data so that it can pull it down and play it.
When you use a VPN, you’re sending your traffic through a tunnel so that it’s “outside” your local network. There will be some exceptions for certain local behavior that needs to be local, unless you configured it not to but you probably didn’t.
It’s honestly curious that it ever works, since the VPN should make it so you’re basically “not there”, and so casting shouldn’t be possible.
My recommendation would be to use Plex if it works.
Download on the VPN and then drop off to cast it is an alternative.
There’s enough moving parts that you’re not going to have any fun figuring it out, and the answer will probably be something you can’t fix.