I think it is a fine line to walk..the last retailer I worked for would make an announcement at intervals before closing..so 15, 10 and 5 and then a final one indicating the store was closed. Yes if you come in before closing you can shop..but I think some common sense and common courtesy should come into play as well.
If you know the store closes at 9pm and you get there at 8:55 with plans to do extensive shopping that is inconsiderate and wrong and you will likely be told at closing to please finalize your purchases and check out and I don't think that is unreasonable.
So by all means enter before closing but be prepared to head to the check out at actual closing time..otherwise wait until the next day and you have more time during operating hours (that is my personal opinion..I am such each retailer and manager has their own feelings on the matter).
That's how we handle it too.
At 8:45, an announcement is made; "If I may have your attention please, JoAnn's will be closing in 15 minutes. Please finalize your purchases and make your way to the registers to check out. We will reopen again at 9 AM tomorrow to serve you. Thanks, and have a great evening!"
After that, people may continue to enter the store, right up until 9 PM, and at 9 PM we lock the doors (so now one else can get in) and repeat the announcement, only saying "If I may have your attention please, it is now 9 PM and JoAnn's is now closed. Please finalize your purchases..."
We will continue to help those still in the store at that point, but we also begin to clean up, so expect lights to go down, bathrooms to close for cleaning, vaccuuming and sweeping to start, etc. There will less staff available to help customers.
If, at about 9:15, people are still wandering aimlessly, we begin to approach them and say, firmly but politely, "I am sorry but we are closed now, is there something I can help you find?" Translation: "time to get going, we are all wanting to get done and go home, PLEASE tell me what you are looking for so I can help you find it and get you OUT!" We are not allowed to actually tell people to go home, but we can make it very obvious that its time for you to leave.