Mine did this and would eventually comes back out (plunger that latches the door) after driving.
In any case it is a solenoid that needs replacing. Mine was replace 6 months ago under GMPP warranty.
It is a nuisance, but got worse over time.
I have just fixed this. It requires lubricating the solenoid.
Remove driver's side rear wheel.
Remove wheelhouse liner (a large number of screws ~11 and two stud retainers)
Remove trunk inner side trim (no need to remove carpet but you do need to remove the sill plate) disconnect the light, one T15 undoes the plastic trim on the divider bracket (there are no other catches, it pulls apart), disconnect switch cable, three retainers; work the two manual release handles through the fabric (mine was glued over).
Locate the solenoid, there is a single 10mm bolt holding it in place. It is hidden behind a bundle of hydraulic hoses. Standing outside your XLR, looking at the rear wheel, roughly it is at the 2 o'clock position.
Undo the latch from the filler, manipulate a section of the cable into the trunk. (Push it backwards)
I also disconnected the solenoid's electrical connector (from underneath).
That is the easy bit.
Now, move the solenoid rearwards. There is no room and the rubber sound deadening grips the solenoid in place. There is a small hook on the solenoid's fixing plate and this has to be pushed outwards at the same time as moving the unit rearwards. This is tricky.
Eventually, there is enough room to turn the unit upside down (rotate along its axis).
This reveals the design. There is a nylon tube with a figure-8 shaped nylon block running inside it. The solenoid pulls the top half and the manual release the bottom half.
I used a fine oil, putting a small amount onto a screwdriver blade so I dropped a controlled amount into the mechanism. Suddenly both the manual release and the return went easy and smooth, far better than it has ever been before. The gas filler door shuts more smoothly as well.
It was then a matter of reassembly, ensuring the right amount of cable was between the latch and where it goes inside the wheelhouse (into the trunk).
Removing the solenoid looks almost impossible hence lubricating the one already there.