During our cross-country trip last Spring/Summer, we stayed a several Walmarts that had signs posted No Overnight Parking. We went into the store to the customer service counter and asked permission to stay overnight. We were never denied, all of the CSR folks were helpful and friendly. To use this was really surprising at a Walmart in very trendy and toney Park City Utah where the lot was somewhat small but we fit perfectly into a curved out spot at the top of the lot. By morning there were 4 or 5 other campers nearby.
What we learned was if a Walmart was our destination for a night's rest, as determined by the navigator in my signature, my DW would call the store in advance and ask permission. She always got the name of the person she spoke to in case someone, police or store personnel asked about our stay.
There is a Walmart less than two miles from our home in Western NY. At the main entrance, there is a sign No Overnight Parking, yet often we will see semis and RVs parked there.
I am no lawyer, but I don't think local municipalities can tell Walmarts, Cracker Barrels, Lowes, and the like what they can allow on their private property, hence the sign No Parking but the stores tell you go ahead, use the edges or most common, by the garden center.