I find my macbook (M1, Air) achieves really good battery life when I'm actively using it as my main computer (so including sleep/hibernate) but extremely poor when I'm not. For example if I turn my Macbook completely off and leave it for a month, the batteries drained completely.
I've had the similar experiences with a 2017 Macbook Air at my previous job. Over time it got worse to the point it'd be at 100% when it suspends at the end of the day and then when I was back at work the next morning there was a 50:50 chance it'd be completely flat. I eventually had to get into the habit of plugging in my Macbook in the morning for ~5mins before starting it up to ensure it didn't try and start on 0% battery and promptly shutdown. The same machine would last all day (i.e. charged to 100% first thing in the morning and then disconnected from power and used on battery the rest of the day) which seems to rule out battery capacity issues. YMMV.