Once a case is resolved, and absent the use of posted bail money to pay fines or fees or restitution, that money is usually returned to the person who posted it, minus 15%.
ORS 135.265(2) provides that once a defendant "has been discharged of all obligations in the cause," (e.g., after a dismissal), the court "shall return . . . unless the court orders otherwise, 85 percent of the sum . . . and shall retain as security release costs 15 percent, but not less than $5, of the amount deposited." ORS 135.265(3) (emphasis added). It is clear from the emphasized language in the statute that the court has discretion to order return of the entire bail amount
There used to be a cap on how much the county could take. After all, it's not clear why the county should take 15% of 100,000 bail in an otherwise uneventful case. If lawyers charged that much for the minimal administrative work involved, we'd be sanctioned for excessive fees.
Regardless, the attorney can move to have all the fees returned. I imagine judges will need a good reason to do so. A grossly unjust prosecution would do it, in most cases, in front of most judges. But certainly you should think about requesting all the money back at least on any case dismissed on motion of the state.