My work MBP also can drain the battery in a couple hours of light use. But that's because of FireEye / Microsoft Defender. FireEye has a bug where it pegs the CPU at 100% indefinitely and needs to be killed to stop its infinite loop. Defender hates when a git checkout changes 30,000 files and uses up all my battery (but I can't monitor this because I can't view the processes).
It’s always the corporate wares that caused the issues, in my case it’s crowdstrike and zscaler. Even with these wares I can last a full day with my M1 pro, I only notice the battery was drained to 0 once when I went to vacation for a week, it’s never happened before these wares
I also have to run Defender on my MacBook at work.
If you have access to the Defender settings, I found it to be much better after setting an exclusion for the folder that you clone your git repositories to. You can also set exclusions for the git binary and your IDE.
I have friendly management. I might ask them to exclude my folder full of git repos. Thank you. (No access on my end)
I didn’t even know Microsoft Defender was a thing on MBPs.