^^^^
I've had that exact problem. I reckon you'll find that the spring mechanism in the unit mounted in the slam panel is at fault. It's actually a known issue on Mk5's and the only longterm solution is to replace the whole lock unit. Meanwhile you'll have to fiddle with a screwdriver or similar to 'spring' it. So check all your fluids, close the bonnet, and don't open it again until at your dealer with a replacement part.
A worse version of this problem is if you can't open the bonnet.