Sorry, I was getting to hasty. Just found the solution in the answer of this question.
The AddFiles action has an optional property RemoveRoot
. Here you have to specify the string of the root you want to remove.
Final solution looks like this.
<ItemGroup>
<Files Include="$(MSBuildProjectDirectory)\SomeFolder\AnotherFolder\*.xml">
</Files>
</ItemGroup>
<MSBuild.ExtensionPack.Compression.Zip TaskAction="AddFiles"
CompressFiles="@(Files)" ZipFileName="$(MyZipArchive)"
RemoveRoot=$(MSBuildProjectDirectory)\SomeFolder\AnotherFolder />