In this case, the Debtor filed a Chapter 13 bankruptcy, and paid regular payments from his wages to the trustee under a confirmed Chapter 13 plan. He missed payments on his house, and the stay was lifted and it was foreclosed upon. Viegelahn v Harris, 5th Circuit 2014.
He continued to pay the trustee the same chapter 13 payments, which accumulated to $5500 or so. Eventually he converted his case to Chapter 7, and the trustee distributed the money to creditors. The debtor sued the trustee for the money back.
At issue was whether the undistributed payments held by the Chapter 13 trustee at the time of conversion to chapter 7 should be returned to the debtor or distributed to creditors under the Chapter 13 plan. The 5th Circuit Court of Appeals concluded that the creditors' claim to the undistributed funds is superior to that of the debtor. Accordingly, the payments must be distributed to creditors in this case.
It's a different result if your chapter 13 case has not been confirmed yet; the Bankruptcy Code says that you should get the funds back, with certain exceptions. It may also be a different result if you dismiss your case instead of converting to chapter 7, that question was not at issue in this opinion.