@matloob requested issue #65264 to be considered for backport to the next 1.21 minor release.

@gopherbot please backport to Go 1.21 and Go 1.22

Comment From: gopherbot

Change https://go.dev/cl/595495 mentions this issue: [release-branch.go1.21] cmd/go: fix build config before creating actions for 'go list -cover'

Comment From: gopherbot

Closed by merging e073febe901cecb3737c712b6d53a8c48684ffb5 to release-branch.go1.21.