Lockscreen Does Not Turn Screen Off when Laptop Lid Closed

I use KDE Plasma on my laptop. It turns the screen of when I close the lid, which is expected. However, if I lock the screen and then close the lid, the screen backlight stays on. This is especially unfortunate because I’m using a hand-me-down MacBook Air, so it uses battery and it keeps the big apple logo glowing from the outside.

How can I get the lockscreen to turn off the screen when I close the lid?