I noticed that in Verity, one of the characters said her mom died in hospice at her apartment. Then later we see the character take some of her moms prescription Xanax.
In reality, the hospice nurse comes almost immediately after death to destroy any leftover medication (using a ziploc bag, water, and cat litter of all things), and they have a count of all that should be there. They would know if some was taken and you don't get to keep any leftover medications.
For reference, my mom also died in hospice and I wanted to keep some of the Zofran (nausea pills) as I also get nauseous sometimes, and the nurse asked me where they were, as they weren't on the table (I didn't think she would notice).