I ran my tests without magickImage.Strip();. If you remove that it will work. But I have no idea why that is happening. I will have to look in the PNG coder and figure that out for you.
I would advise you to remove the if and always set the ResolutionUnits to PixelsPerInch.
I would advise you to remove the if and always set the ResolutionUnits to PixelsPerInch.