Legally, closing an underperforming location in response to a unionization attempt and after a successful unionization are completely different situations.

After unionization, what is required when closing a store is written into the negotiated contract.

The contract isn't really the issue. It's what the law should be.

The parties could put nearly anything they want into the contract. But if the company intends to close the store then they'd just not accept anything in the contract that makes it difficult to close the store, and if the workers go on strike then they were going to close to store anyway.