"How do I make an adjusting entry to correct the expense for a prior period?"
You control what you put on this Deposit. You have to Know what needs to happen, next.
I thought we spent $1,000 on Subcontractor Graphic Arts, but that person never cashed the check. That Deposit is against Other Liability. I need to chase down the person and replace the Lost Bank Check by paying out the liability on a New Check; this won't be more expense. Or, I turn it over to the State, paying it out as Liability, as Lost Property under the Escheat laws. Or, I enter the offsetting current Deposit as "Prior Year Equity Restatement" because I though we made a payment to the State for a filing fee with some sort of application packet, and did not know the engineer failed to file; there will be no replacement check until we determine the status of that application process.
For Prior Year Restatement, you Zero that out on the first date of the Next Fiscal Year to real equity.