Disconnect processor pin from P0.6 - does it make a difference?
Processor pullup may be driving U7 on.
Suggestion - try R16 & R17 = 10K each.
Should work as is but R16 = 10k will turn off T1 better and R17 = 10k will allow U1 to regulate properly - not that it needs to here.
The circuit should work if built as shown - but not quite as you describe.
Call voltage at top right Vbattery.
Voltage at left = V_PVIN
Assume battery is present at all times - if not results may be indeterminate.
Assume T1 is driven hard on and has minimal voltage drop (forced beta is very high).
When charging, V at P06 will be very close to Vbattery (via T1) and Vpvin will be a diode drop above Vbattery. Vp06 will remain at Vbattery until U1 turns off, even when V pvin falls below battery voltage.
U1 turns off when R18, R19 divider turns it off = when V pvin = 2.11V with R18 & R19 as shown.
Iv V p06 does not fall to ~= 0V when V pvin is < about say 2V then there is something wrong with how your circuit has been built.
eg say Vpvin = 2V.
V at R19, R18 junction is 2V x R18/(r18_+r19) = 2 x 47/115 = 0.817V. This is below the TLV431 turnoff voltage of 1.25V so U1 MUST be off.
Worst case off state cathode current of TLV431 is < 0.05 uA (!!!) so max V across r16 = V = IR = 0.05 uA x 100k = 5 mV !!! so T1 is off.
So circuit should work.
Change 2 resistors as above - but should be OK as is.
The circuitry to the left of and including R15, R14 is a shunt regulator which shunts PV panel current via T2 & R20 when Vbattery reaches or exceeds 2.75V - ie as long as T1 is hard on the shunt regulator action is not affected by V_PVIN, only Vbattery.
The circuitry to the right of R18,R19 inclusive is intended to allow the clamp regulator to sense battery voltage when the PV panel voltage rises above a certain voltage and to disconnect the R15, R14 voltage divider when PV Voltage is low (to stop the divider draining the battery when there is no PV input).
With the values shown U1 should turn on and off sharply at about 2.11V (TLV431 = 1.25V reference. Vtrigger = (R18+R19)/R18 x 1.25 = 2.11V. When V PVPANEL exceeds ~ 2.11V U1 turns on turning T1 on and placing Vbattery across R15 + R14.
Below panel voltage of 2.11V charging will still occur via D2 if V_battery is low enough BUT battery should never be that low.
Sanity check: Ensure R17 is not too large -
A TLV431 typically needs about 80 uA max to operate - varies with manufacturer - say 100 uA.
I_U1 = I_R17 ~= (Vbat - VbeT1 - Von TLV431)/R17 = (2.8-0.6-1.25) / 100k ~~~= 9 uA = too low. So TLV431 will not be in proper regulation BUT it will still draw enough current to fully turn on T1 (see below) so in this case this should not matter.
If forced beta drive of T1 is too low then T1 will not saturate and divider voltage will be too low.
I_R17 = 95 uA. I_T1-CE ~= 2.8V/103k ~= 25 uA.
So forced beta T1 ~= 25/9 ~+ 3 = OK.
A BC807 with forced beta of 3 will have very very low saturation voltage - well under 0.1V (probably).