Short answer. No, you would generally be excused. A debtor whose duty to return a thing arises from a crime is normally liable for its loss no matter the cause, even accident. But once you offered the thing to the person entitled to it and he refused, without justification, to accept it, Article 1268 releases you from that strict liability.
What the law says
When the debt of a thing certain and determinate proceeds from a criminal offense, the debtor shall not be exempted from the payment of its price, whatever may be the cause for the loss, unless the thing having been offered by him to the person who should receive it, the latter refused without justification to accept it.
Civil Code, Article 1268 — Loss of a Thing Arising From a Crime. Read the full provision →
Debts arising from a crime are held to a stricter standard
Article 1268 singles out one situation for stricter treatment than ordinary obligations: when the duty to deliver a specific thing exists because the debtor committed a crime against the person entitled to it. When the debt of a thing certain and determinate proceeds from a criminal offense, the debtor shall not be exempted from the payment of its price, whatever may be the cause for the loss. In an ordinary obligation, a debtor who loses the thing through a fortuitous event, something beyond anyone's control, is usually excused. Here, that excuse does not apply. Someone who acquired an item through a criminal act stays on the hook for its value even if the loss was pure accident.
The one way out: a valid offer that was unjustifiably refused
The article carves out a single, narrow exception. The strict liability does not apply unless the thing having been offered by him to the person who should receive it, the latter refused without justification to accept it. If you genuinely tried to return the item to the person entitled to receive it, and that person turned you down for no valid reason, the law no longer treats you as the one keeping the thing at risk. From that point, responsibility for whatever happens to it shifts away from you.
What makes a refusal "without justification"
Not every refusal counts. The offer has to be a real, complete one, made to the actual person entitled to receive the thing, not a token gesture or an offer made to the wrong person. The refusal then has to lack any valid reason: for example, the victim rejecting the item because it was not genuinely the one taken, or because the offer came with conditions attached, would not be an unjustified refusal. If the victim had a legitimate reason to decline, such as the thing being damaged or not actually the one owed, the exception in Article 1268 does not come into play, and the debtor's stricter liability continues.
Why the law shifts the risk this way
The exception reflects a basic fairness principle running through the law of obligations: once a debtor has done everything the law asks of him, offering full and proper return of the thing, he should not keep bearing a risk that is now within the other party's control to end. A victim who unjustifiably refuses a genuine offer to return the thing is, in effect, the one who is keeping the thing exposed to loss by declining to take it back. If you find yourself in this situation, keeping clear proof of the offer and the refusal matters, since you will likely need to show both elements to rely on this exception.