Try disconnecting the connector in the door hinge and cleaning the contacts. If that doesn’t work, try the contacts behind the door card. The pins in the connectors are not gripped well by the female side of the connector and the connection can be poor.
It may not work, but it’s a common fault and a cheap fix to try first.