Expected, that go build -trimpath will have the same behaviour as one with no flag.
If the behavior were exactly the same, then there would be no need for the flag. 😅
I think the issue you are describing boils down to: the Go release should ship with a standard library built with -trimpath.
I don't know how feasible that is, but I suspect that it is tantamount to saying that the -trimpath flag should be enabled by default: otherwise, users who invoke go build without -trimpath would run into the same problem that you are running into with-trimpath.
(I think I actually agree that -trimpath should be the default, but it's not a trivial change, and should probably have a separate proposal. See also #24904.)