The root cause is that we access the position, which is unsupported by GZipStream (unseekable stream).
https://github.com/dotnet/runtime/blame/218a4b1dad3f73eec8f9898761501c4cfa14698e/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarWriter.cs#L314
The fix would be to detect if the stream is seekable. If it is, then we can set the length to the position. Otherwise, we skip that step.
Thanks @rainersigwald for reporting this.