If you done it with gnome, then it is not ready immediately after log in to it.
I bet you need to do it with a command line tool who takes effect before the login screen appears.
Can you please give us a inxi -Fzx to see with what hardware you are dealing?
Just to make sure things are clear:
You have a laptop with an external monitor hooked up to it running fedora workstation.
You power on the laptop
- At this point the laptop lid is open, and everything is displayed on the external monitor.
- The login screen comes up on the external monitor. You than log in and then shut the lid on the laptop. If you wait long enough for the desktop to come up it does not shut off.
If you look at /etc/systemd/logind.conf
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
You’ll probably want to change one or both of the top two to ignore.