This was the same for me. M4 Pro is my first Macbook ever and it's actually incredible how much I prefer the daily driving experience versus my brand new 9800x3d/RTX 5080 desktop, or my work HP ZBook with 13th Gen intel i9. The battery lasts forever without ANY thought. On previous Windows laptops I had to keep an eye on the battery, or make sure it's in power saving mode, or make sure all the background processes aren't running or whatever. My Macbook just lasts forever.
My work laptop will literally struggle to last 2 hours doing any actual work. That involves running IDEs, compiling code, browsing the web, etc. I've done the same on my Macbook on a personal level and it barely makes a dent in the battery.
I feel like the battery performance is definitely down to the hardware. Apple Silicon is an incredible innovation. But the general responsiveness of the OS has to be down to Windows being god-awful. I don't understand how a top of the line desktop can still feel sluggish versus even an M1 Macbook. When I'm running intensive applications like games or compiling code on my desktop, it's rapid. But it never actual feels fast doing day to day things. I feel like that's half the problem. Windows just FEELS so slow all the time. There's no polish.
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).
Part of why Windows feels sluggish is because a lot of the components in many Windows machines are dogshit - especially storage. Even the old M2 is at 1400 MB/s write speed [2], M5 is at 6068 MB/s [2]. Meanwhile in the Windows world, supposed "gamer" laptops struggle to get above 3 GB/s [3]. And on top of that, on Apple devices the storage is directly attached to the SoC - as far as I know, no PCIe, no nothing, just dumb NAND. That alone eliminates a lot of latency, and communication data paths are direct as well, with nothing pesky like sockets or cables degrading signal quality and requiring link training and whatnot.
That M2 MBA however, it only feels sluggish at > 400 Chrome tabs open because only then swapping becomes a real annoyance.
[1] https://9to5mac.com/2022/07/14/m2-macbook-air-slower-ssd-bas...
[2] https://www.tomshardware.com/laptops/macbooks/m5-macbook-pro...
[3] https://www.reddit.com/r/AcerNitro/comments/1i0nbt4/slow_ssd...
Have you checked whether the work laptop's bad battery life is due to the OS, or due to the mountain of crapware security and monitoring stuff that many corporations put on all their computers?
I currently have a M3 Pro for a work laptop. The performance is fine, but the battery life is not particularly impressive. It often hits low battery after just 2-3 hours without me doing anything particularly CPU-intensive, and sometimes drains the battery from full to flat while sitting closed in a backpack overnight. I'm pretty sure this is due to the corporate crapware, not any issues with Apple's OS, though it's difficult to prove.
I've tended to think lately that all of the OSes are basically fine when set up reasonably well, but can be brought to their knees by a sufficient amount of low-quality corporate crapware.