Like many things, it depends. The batteries are getting cheaper. So more competitive.
Only Natural Gas is clearly and generally a cheaper solution than solar for power backup from what I can see. Gas & Diesel have plenty of issues if only for outages. If you already have a large propane tank, those 250 or bigger ones, a propane generator probably makes sense.
Part of the positives for the Natural Gas & Propane generators, is they generally have a lot less that goes wrong and don’t have the issue of the gas going bad. Small propane tanks are notorious for freezing in cold weather and at least around here, pretty expensive.
Having a large battery backup system that you keep charged off the grid is becoming a viable idea.
If your power is very spotty, any of these solutions become a good idea. I came close to the battery system in my last home as I already had the panels and no natural gas. I never did go ahead with the additional $5-$10k purchase.