We only implement the most basic policy in systemd's logind: We give the user/admin a way to disable logind's built-in lid switch handling entirely, and we give DEs/apps a way to turn it off temporarily. DEs may then build on that and implement a smarter policy, that takes other conditions into account.
GNOME for example turns off lid switch handling if an external monitor is plugged in. If you want a different policy, file a bug against GNOME or hack it up yourself.