If there was a written retainer agreement, as there should be, the terms of the agreement would provide an answer to that question. If there was no agreement you could certainly argue that money paid to the attorney should be held in the trust account until earned by providing the agreed upon service.
Hi, have you tried calling the attorney's office? Sometimes flat fees are taken for bankruptcy, which are "due (collectible) when paid to the attorney." This doesn't mean that your retainer is "gone," but possibly that it can't be refunded.