Why is it not possible to completely save the battery when on AC? i.e. charge the battery to 100% (or something close) but power the laptop directly via the charger.
That's already what's happening. However that's not enough. Leaving the battery full is harmful in and of itself.
Recent macbooks can't run directly from the charger. The charger is not beefy enough to provide power during peak CPU/GPU usage.