I also struggled with this docker buildx. I used --driver-opt with proxies, but still it did not solve.
Passing proxies to --build-arg also did not help me. (In one VM it solved the issue but in other VM it did not help)
What helped me is when I passed "/run/buildkit/buildkitd.sock" to no_proxy
something like this export no_proxy="127.0.0.1,localhost,/run/buildkit/buildkitd.sock"
/run/buildkit/buildkitd.sock is critical for buildx.