Could not resolve host: github.com for SamSaffron/pups.git

Same issue, I went to add the cloudflare template and when rebuilding it could not resolve github.com.

I have already tried the solution of using googles DNS servers in dockers configuration file with no success.

doing ping github.com works but again, it cant seem to resolve when rebuilding.

Here is the error:

Here is me pinging github.com
Imgur: The magic of the Internet

Interestingly though, when I ping6 github.com I of course do not recieve a response because github does not have AAAA records i believe.
Imgur: The magic of the Internet

Any idea how to fix this?