Everytime I shut down my computer by using the GUI it restarts instead. On the second time however, it will shuts down.
do you remember if there are any bios/uefi settings that you configured? also what happens if you run, sudo systemctl poweroff?
I turned off secure boot and fast boot. Shutting down from the terminal shuts its down complete but introduces a different issues, where the first attempt on reboot will fail but it will reboot on the second.