This isn't really an issue, more a limitation combined with whatever you've set your laptop to do when you close the lid. The game doesn't much like being interrupted, and when you close the lid you're totally interrupting the game UNLESS you hit pause AND you've set your laptop to stay fully on (and possibly even keep the screen on) when you close the lid.
You CAN set up a borderless windows mode as per earlier answers BUT there's ALWAYS a performance hit. You see, in fullscreen mode your system grants full control of the screen output to the game and gives it as much system resource as possible, whereas in any windowed mode your system keeps everything else going and keeps parental control of the screen. HOWEVER, if you're system is modern and powerful enough you might not notice much difference.
The simplest solution is play the game fullscreen and save & quit if you need to close your lid or do something else.