I love errgroup, though I always use it like this
g, gCtx := errgroup.WithContext(ctx)
And then use gCtx in the g.Go function calls.That would have avoided the problem.
Perhaps worth a submission to https://staticcheck.dev/ ?