It varies. We have found that the stores farther into the park close at or even before park closing time depending on location, how busy the park is that day and size of store (e.g. some of the very small ones close early).
On Main Street they usually remain open up to an hour after park closing, although they might start limiting access a little earlier. On the night of a special event (e.g. Halloween parties) it was a hard close at midnight when we went.