Repro case:
$ GOTOOLCHAIN=local go version
go1.21.9
$ cat go.mod
module w
go 1.22

Failed to run '/usr/local/go/bin/go env' (cwd: /Users/hakim/projects/go-qrcode): Error: Command failed: /usr/local/go/bin/go env -json GOPATH GOROOT GOPROXY GOBIN GOMODCACHE
go: downloading go1.22 (darwin/amd64)
go: download go1.22 for darwin/amd64: toolchain not available
go: downloading go1.22 (darwin/amd64)
go: download go1.22 for darwin/amd64: toolchain not available
The root cause is
golang/go#65580
that was closed as a duplicate of golang/go#62278,
which was closed in favor of a better error message.
cc @golang/tools-team