InSight's Final Selfie
There was a possibility to keep going until the last operating science experiment had to be turned off, and then InSight would keep operating on safe mode until it eventually ran out of power.
There's always a push to keep an experiment running as long as possible. It tests the experiment to extremis, and it keeps people employed. By running it as long as possible, they also discover the limits of the engineering in the harsh environment. This time though, they decided to turn off safe-mode so the seismometer can keep operating until the end.
Safe-mode is where the system powers down to minimal energy usage. Usually this is employed during dust storms, or when it loses communications. It allows the lander to continue for a much longer time before it runs out of power.
The dust on the solar panels is preventing it from generating enough energy to run all its experiments, so they've all been turned off except the seismometer - the experiment that was literally the reason for sending it to Mars in the first place.
There are two main reasons why the solar panels don't provide enough energy to recharge the batteries properly. The first is obvious enough, it's the dust settling on the panels and reducing their efficiency. At the time I write this article (17th July, 2022), Mars is past perihelion and its orbit is taking it further away from the sun. The amount of energy from the sun falling onto the Martian surface diminishes exponentially with distance - the further Mars gets from the sun, the less energy reaches the surface.
It should also be remembered that InSight is in the Northern hemisphere. On July 21st 2022, there will be the Winter Solstice - the beginning of Astronomical Winter. When Summer came around last time, there was not enough energy being generated by the solar panels to power the other experiments. As you may be aware, I would have loved weather data to start flowing again, but alas that didn't happen. Since then, more dust has settled on the panels. The settling of dust is an ongoing issue, so it's just going to make things worse.
When InSight detects the power in the batteries is below a certain point, it is programmed to enter safe-mode, giving the panels a chance to charge the batteries. By turning off safe-mode, the scientists will definitely shorten the life of the lander, but they'll get continuous data right up until the end. It makes sense.