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.