My understanding is that the reason why Linux still struggles in this front is that nobody has put in the hardware-specific optimization work to make it happen. There’s also some friction with how the bulk of Linux dev attention is paid to servers rather than portable consumer hardware.
I am probably not competent to improve linux battery life myself (or at least I certainly don't have the time to get into that). But I can choose to spend my money on hardware and companies that explicitly support Linux, even if they aren't at the very top of the spec sheet. This has the best practical chance of convincing big-money companies and Linux kernel experts to actually spend time and money on this. Meanwhile, buying a Macbook and installing Linux on it is fine, I guess, but also invisible to the corporate world.