CFI is acting as PIC
In a footnote to Administrator v Strobel, the NTSB states:
Our precedent makes clear that, “[r]egardless of who is manipulating the controls of the aircraft during an instructional flight, or what degree of proficiency the student has attained, the flight instructor is always deemed to be the pilot-in-command.” Administrator v. Hamre, 3 NTSB 28, 31 (1977). This principle was reaffirmed in Administrator v. Walkup, 6 NTSB 36 (1988).
THE PILOT IN COMMAND AND THE FARS: THE BUCK STOPS HERE (ALMOST ALWAYS) has some other examples of determining who is PIC.