The human body is sacred and cutting it is contrary to its sanctity. In addition to the cutting and mutilation of the body, a post-mortem also results in the private parts of a human being, albeit a dead one, being exposed, which is a shameless act.
On account of legal requirements, Muslims are compelled to undergo post-mortems and in light of the fact that it is a legal requirement, there could be some leeway for a doctor to perform a post-mortem, especially if he will be able to aid in the quick release of the body and minimise mutilation to the corpse.
and Allah Ta’ala Knows Best
Mufti Ebrahim Desai