I researched this in (checking notes) 2009 or so… things may have slightly changed since (and my memory is fading away)
At the time there was a standard for sleeping. Microsoft was part of the standard… and then they decided to implement in a different way (classic Microsoft, of course).
Hardware producers then adjusted to windows because… well… we were dozens of us using Linux on laptops.
This created issues in Linux because there were some purist developers that wanted to follow the standards, others that were more pragmatic and wanted to implement the windows way. In the end nothing worked.
Fast forward to today, windows waking up constantly I guess it’s broken as expected because it wants to allow background processes to do stuff. Linux not waking up sounds still the issue from 2009: there are multiple levels of sleep and the deepest was the most problematic. If I have to guess your laptop wakes up just fine if the battery is full and you left closed for few minutes… while it doesn’t when the battery is low-ish and/or you left sleeping for a longer period
This kind of stuff must happen at hardware level… wake on lan is in hardware.
Ethernet cards keep in getting packets (arp at very least) even if they are not directed for them. If the OS needs to check all packages it would be always on
That said… wake on lan is also a waste of energy if you don’t need (why powering the Ethernet cards?)