I took my G31 to the stealers as has the same issue, after re initialising software (as they said) told me all is fine. Crock of poo... it's the same as it was when I took it in just doesn't soft close.
I took it back now they say it needs new struts under warranty, I'm not sure as it's only the glass rear window that has a gas strut on the 5 series (which all works fine) and the tailgate is operated by 'sprung spindle drives'. Downside of which is that they have to remove the complete headlining / rear trim and everything that is fixed to it to do the job. I can envisage some creaky trim and scuffs coming!!
Time for a little more investigation first me thinks