The topic is probably more complicated due to the high popularity of the model, especially with an additional flap

The first question is whether this copy had such a flap or was it vaccinated by our dealers during the repair of the vehicle?
If you press a button on a small flap, it opens or not? Can you hear any lock on the lid?
The layout is a bit strange: it consists of a tailgate lock and a tailgate lock in the tailgate. They are controlled separately, and this is understandable (lid button - lid lock, buttons in the lid lid - lid latch). On the other hand, the opening microswitches are built inside locks and information from them is connected to one wire. So the system does not distinguish what is open.
One thing is certain (see owner's manual). "Opening the tailgate
it is not possible if the cover is there
open or not closed properly. "
So it looks like the system waits for information from any lock about opening the lid or the hatch and its re-closing and blocks the operation of the hatch lock and the covers for this time.
you have to undress - get to the locks, observe whether there is voltage to the lock of the damper cover, measure the limit switches on the closed locks or shorten to ground, or simulate the microswitches and see what the system does.