How it works now : I'm building uwp package as msix bandle. Then using MSIX Packaging Tool editing AppxManifest file and sign recreated msix file. I'm trying to edit AppxManifest file through System.IO.Packaging.Package class but this method corrupting file.
You could use signtool
to sign the MSIX package with a PFX file. This is what you would normally do if you want to automate the signing as part of a CI workflow. You could for example upload the PFX file to Azure Pipelines as a secret file and download it in your build pipeline.
Please refer to this MSDN Magazine article for more information about how to do this.
You won't be able to modify a signed package. Instead you should create a new one.