… while the VPN is connected using 3rd-party VPN applications.
Given that none of your code is involved here, I recommend that you file a bug report about this. Please post your bug number, just for the record.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"