This is just an observation, although a potential problem, so if anyone has any thoughts I would appreciate it.
I have my power options set up that
when I close the lid
with power connected it sleeps
with battery it hibernates
I wondered what would happen if I close the lid with power connected and then disconnect the power cable. As I expected it assumes there is still power so although on battery the laptop is in the unwanted sleep mode.
The problem is that this could lead to a drain on the battery and overheating.
It would seem sensible that if external power is removed it would recognise that and treat it as a battery state only.
Although this may well be a windows issue, is there anyone who thinks this option could in future be triggered by maybe the bios or windows recognising the change.
That is a Windows responsibility. Using Modern Standby (S0) you would be in standby until 5% of your battery is used, and then hibernation is entered.
If you haven’t modified the type of suspend you are using, then this would still be the case.
What you CAN do is modify the Modern Standby battery threshold. This means instead of 5% you could make it 2% or, in my case, more (25%).
Having the hardware recognize that power has been removed, and sending a signal to the OS to handle the event is something that would require hardware and software integration. It is also something that Windows is already aware of, but doubtful it is recognized when in a low power state.
This is the issue, Windows only takes action when the lid is first closed, so if you close the lid with power connected, it will sleep the computer, and no longer worry about taking action because the lid has been closed. To change this behavior you would have to change what the computer does AFTER the lid has been closed, like what @2disbetter is recommending.