Keep the wireless network active when the laptop lid is closed

On Debian 13, edit the following file:

nano /etc/systemd/logind.conf

Add the following lines:

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore

Restart the service:

systemctl restart systemd-logind