May not be a faulty sensor, could just be the strike plate (bit on door pillar) is needing adjusted - door not closing enough to contact fully with the sensor. Couple of Torx screws to release and move it very slightly inwards (you'll see little markings on edge of plate to give you a guide). Five minute job and it may save you the are*eache of going back to the dealer.

D