It depends on your store politics.
At some of my old stores, if you were Front End, Backroom, or 'Clopening', you left at the end of your scheduled shift while Salesfloor stayed after closing. Save payroll as much as you can. You could stay if they asked you to stay.
At other stores, everyone stayed after closing. Cashiers, CAs, Salesfloor...everyone.