Build id is a pretty grey area for semver and the npm registry. Since it's not part of semver resolution it's stripped when sending the packument data, but kept in the package.json in the tarball.
Discussion at npm/cli#1479
npm pkg fix may want to not strip build id by default.