A possible solution you can try is to update resolv.conf file. However, as in App Engine, the local filesystem that your application is deployed to is not writable, you would not be able to edit.
You are more likely to get some results on that by using App Engine Flexible Environment with the
custom runtime. The custom runtime environment runs as a docker container and docker tries to make a binding link to a system
resolv.conf file.
You can also try to override DNS server used as shown here [3] using
dns.resolver.
Note that the suggestions here have not been tested on my end as it is a customization of your environment, so I recommend that you consider it first in a test environment.