There is a known fault on the Passat B5 with sound deadening material in the door jamming the lock. Maybe the same for the Mk4? they share a lot of the same fittings.
"the fix is to remove 3 screws that hold the door trim on, then remove or stick back the sound insulation inside the door to the outer door skin, making sure that none is jammed in the lock mechanism. In 95% of cases the door lock will now lock and un lock on demand. Total cost 15 minutes time."