I think "malls" in the traditional sense of giant concrete behemoths with nothing but row after row of stored and fast food were killed by online, but if you open up the definition a bit, some are thriving.
Like where I live, it's an 'archology'. A mix of residential units on top and commercial on the bottom. All outdoors which is a draw for folks in the forever pandemic world.
A mall that's only random clothes, shoes, and jewellery stores surrounded by an ocean of parking lot is very unattractive.
As you say, a mall with actually useful stores, like grocery, pharmacy, perhaps a restaurant or two (not chain fast food), etc, with residential units on top or very close to constitutes more of a community than a mall and is very likely to be sustainable versus the former.