The lack of ventilation or ducting, cooling fan inside the drawer;
this may present a problem after some time due to heat buildup.
And, as mentioned in previous reply, why is display lid open when
the external screen can run with the portable's lid closed (?)
If you have an inexpensive indoor-outdoor (wired or wireless) type
thermometer and place the outdoor sensor inside the drawer with
the portable computer, and close the door; this may show you a
few temperature rises and over some time, reasons to give it vents.
A vertical 'dock' may be useful for desktop placement of the Mac.
This brand has some that seem OK https://hengedocks.com/
Also there are cable adapter docks to help connect. re: OWC
The system Console log files generated may be helpful if the unit
chooses to 'hang' or odd effects due to heat. ~ Crash reports or
other logs (by time and date) may relate to sessions with portable
run inside a box. It may yearn to breathe free in the great outdoors.
Good luck & happy computing! 🙂