As soon as he heard that I lifted up my voice and cried out, he left his garment beside me and fled and got out of the house.
Genesis 39:15

Joseph's garment being stripped from him before imprisonment mirror's Yeshua being stripped before execution. Both men were falsely accused, stripped, and buried in the ground. Figuratively buried in Joseph's case, literally in Yeshua's.

Once in prison (the grave), Joseph took charge of the prisoners (the dead). He held the keys to the grave. See v22.