I might have this wrong but I understood that opening a door or the tailgate will wake the car up but when it goes back to sleep it will not wake up again if there is a door or tailgate open. Hence - if working on a car for an extended period or camping, rather than opening and closing doors all the time - leave a door open/ajar and the car will not wake up.
Hence if the tailgate was open the battery should not drain down unless something like an internal light or something else is left on.
Garry

