This is a Google/Android thing, not Samsung: " It is not possible to use Chromecast with a VPN on Android or iOS. This applies to the operating system's built-in mirroring functionality, as well as Google Chrome's mobile apps. To mirror your screen to Chromecast, you will have to use a PC or laptop instead"
@PaulC59: I think the inability to screen mirror when a VPN is active on your phone comes down to a visibility issue. Screen mirroring requires both the phone and TV to be connected to the same Wi-Fi network, but VPNs tend to hide your IP address and change your location, which would naturally interfere with the mirroring feature.