Hi,
my laptop under Endless OS was affected by a nasty bug where the computed couldn’t be shut down unless I pressed and held the power button, otherwise the computer would restart itself.
My guess is : this behaviour was introduced with a linux kernel upgrade but i didn’t really deepcheck. Btw my computer is a HP Pro Book G1.
I solved this issue by simply turning off wake-on-lan feature in UEFI settings. I don’t know why because no ethernet cable is plugged.
Hope it will help some people encountering the same bug