As on any Peugeot/Citroen, it needs to relearn the end-positions. When the window is closing, the window ECU stops if there is a finger in the way and immediately lowers the window again to avoid injury.
The solution is to lower the window with the switch, and maintain pressure on the switch a few seconds longer so it can relearn the "down" position. Then raise the window and again keep the switch in the up position a few seconds longer to relearn the "up" position.
If the window is sticky in the guides - check there is no debris in the guides or channel at the top and apply some thin silicone oil to the guides.