This does work, however it’s really not ideal for Windows machines using a dock (which is usually the power connection) and external monitors. If you unplug first, all your windows get moved to the single laptop display, but if you close the lid first, everything is where it was when you resume.