Typically, if a Chapter 13 Plan is not confirmed, your money will be refunded to you, minus any court approved payment for attorney fees or trustee commissions. Hope this perspective helps!
You need local advice on this question, even though you're about to get plenty of out of state advice.
Nevada, for example, has Local Rule 3015, which would in addition to paying the administrative expenses (the trustee and your attorney) as provided by the code, purports to pay any "Adequate Protection" payments due. I believe this conflicts with the plain language of the code on what is to be refunded, but that's not the point for you. Rather, it is that this is a local question, and that you should ignore every single answer from out of state attorneys.
In Pa the refund goes back to the debtor in an unconfirmed plan unless the attorney for the debtor asks the court to retain jurisdiction to enter an order for their unpaid fees. In that situation the refund goes to the attorney to satify fees . This is after the trustee deducts his commission.
So the answer depends on the jurisdiction you are in, your attorney and fee arrangement