Hi, Welcome to the FF.
Anti Pinch Sensor is a device built into the top and front of the window channel in the top door frame. It's designed to stop the window going up if your finger, hand, head etc. is between the top of the glass and the door frame.
Most likely cause of the problem is the large round connector between the front of the door and the door frame (A post). Disconnect the connector and spray it with electrical contact cleaner (NOT WD40 or similar) and refit the connector.
If that doesn't cure it, you'll need to remove the door card and door inner metal panel to check the Anti Pinch Sensor connector plug inside the door. They have been known to fall off.