What happens to the target of Oko, Thief of Crowns' second ability when it is put in the graveyard?
It will become a Death's Shadow again. Whenever an object changes zones, e.g. when it goes from the battlefield to the graveyard, it gets completely 'reset': 


  400.7. An object that moves from one zone to another becomes a new object with no memory of, or relation to, its previous existence.


The rules list nine exceptions to this, but your situation is not one of them.