Caffeinate doesn’t prevent sleep with the lid closed.