I’m dealing with somewhat the same problem. The only way to keep it closed is by locking all the doors and then shutting the liftgate manually. After a day, I got the red warning light (red car + !) but managed to reset it. However, the issue persists. The dealer thinks it might be a sensor issue, so I’ll have to bring it in.