If i were you i would start with checking to see if the green line is clogged. and make sure that the wastegate bypass solenoid (the small thing the red and green lines run to) is working and not stuck shut. Somewhere in this system is your issue because when you bypass it by disconnecting the red line the wastegate actuator has no issue keeping the wastegate closed(you have no issue building boost).
The wastegate bypass opens under acceleration and allows boost to bypass the wastegate actuator thus keeping the wastegate closed building boost up to around 16.5 psi stock then it starts to close keeping the boost from bypassing the actuator which then opens the wastegate thus limiting the max boost level and overspeed of the turbo.
You will need a boost fooler to keep the ses light from coming on above 24psi and this will also keep it from defueling above that.