I'll just throw this out there: putting a twig in your lock mechanism isn't a great idea. It's an electronically controlled mechanical latch that won't take kindly to splintered wood or bark gumming up the internals.
BUT there is a solution.
I've kept one of these cheap carabiners in my Subaru outback for 5 years for the exact same reason. It very closely matches the diameter of the latch ring that the tailgate latch locks to, and very effectively fools the tailgate into thinking it's closed. It also serves double duty as a tie-down point so the hatch can be held partially closed.
With the tailgate open:
1. Insert narrow end of carabiner into latch from below (same direct the latch ring would enter)
2. Push gently until you feel TWO distinct clicks (there should be no electronic noise) and the carabiner is captured by the latch
3. Pull gently but firmly on the carabiner to confirm it's locked in place
4. Load your cargo. Be sure it's secure and won't slide out the back. If it extends beyond your bumper, it legally needs to have a high-vis flag on the longest protruding point (a red T-shirt tied around the end works in a snap).
5. Manually adjust tailgate height to best suit your needs. You don't want the tailgate moving while driving as it could stress the hinges or the frame of the vehicle. Accelerating and braking can move the hatch up or down if not secured. Remember, the car is designed for the tailgate to be connected in 3 places when in motion. Drive carefully with this in mind!
6. After reaching your destination and unloading, press the electronic hatch release on the tailgate or your fob to release the carabiner. Press again to close the tailgate.