Optimally I’d like to see the body remain until another NPC encounters it as part of its routine and reports the murder. If anyone witnessed the murder the player should take a significant reputation hit and become wanted by the guard of that area. If no one witnesses it the body will be removed and the crime remains unsolved.
To take it a further step towards complication, optimally I’d like to see NPCs have redundancy in their routines. In other words, an NPC can step in as the town blacksmith if the existing one is killed. After the secondary NPC is slain the town then goes without that function filled.
In my opinion you’d need a system similar to Morrowind where if you kill a NPC required for the main quest you get a message that the you can no longer proceed on that quest. At that point you can revert to a previous save or continue sandbox-style without having the option to fulfill the primary quest line. Any other NPCs would be fair game in that scenario.
That’s just my opinion.