macbook: how to keep all the applications I have opened and show on my external monitor when I close the laptop

I have a Macbook Pro that runs Mojave 10.14.4 with an external monitor, I have configured the duplicate screen and I have converted the external monitor to my main screen.

When I close the lid, the monitor turns black, as expected, when I press the key to light up again, all the applications I opened while the lid was open are not displayed on the external monitor. If I open the lid, the monitors turn black and I press a key I can see all the applications on both monitors. As I expect to simply log in, connect my Macbook and see what I'm working on my main monitor, it would be nice if I did not have to open my secondary monitor to do it.