One of my laptops still has win7 as an os. I've been messing about with it. I've connected it via hdmi to my tv, changed the 'what to do when I close the lid' to nothing.
Here's what I've noticed - if I use windows + p and set the display to 'projector only' - then closing the lid doesn't seem to have any effect on the tv display.
However, if I set the display to 'duplicate' and then close the lid - the tv screen goes dark for about 5 seconds before reappearing and it fits the screen a little differently then it did before closing the lid.
So ... I'm not sure how you're displaying prior to closing the lid ... but maybe try the 'projector only' setting if that's not what you are already doing.