Socket connection timeout after connecting VPN

I haven’t seen anyone else encountering this error but when I connected to whatever VPN I set up on AWS EC2, I always got “Socket connection timeout” error when running eas or npx expo commands.

For example:

freegyp@Yupengs-MacBook-Pro Pep % eas update --branch preview --message "Updated version"

[Network] request to https://api.expo.dev/graphql failed, reason: Socket connection timeout
    Error: GraphQL request failed.

freegyp@Yupengs-MacBook-Pro Pep % npx expo prebuild
✔ Created native projects | /android, /ios already created | gitignore skipped
✔ Updated package.json and added index.js entry point for iOS and Android
Unable to reach Expo servers. Falling back to using the cached dependency map (bundledNativeModules.json) from the package "expo" installed in your project.
FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: Socket connection timeout
FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: Socket connection timeout
    at ClientRequest.<anonymous> (/Users/freegyp/jstest/PepReactNative/Pep/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:511:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:511:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

When I ran it without connecting VPN, this error happened sometimes but not every time. When I ran it with VPN connected, this error always happened.

Is there anything I can do to make it work with VPN?