How to prevent taskbar and desktop from disappearing when the laptop lid is closed

I’m running KDE Plasma 5 on Arch Linux. I have Plasma configured to do nothing when the laptop lid is closed and external power is attached. I do this so I can remote into the existing X session using NoMachine.

Recently I’ve noticed that when I connect to the session while the lid is closed, the display is completely blank. If I then open the lid, the display reappears.

What can I do to make sure the taskbar and desktop do not disappear when the laptop lid is closed while I’m connected to the X session though NoMachine?