It depends on the wording of the TFR, but most likely they both made a mistake. Most VIP TFRs contain language similar to:
ALL ACFT MUST BE ON AN ACT IFR OR FILED VFR FLT PLAN WITH A DISCRETE CODE ASSIGNED BY AN AIR TFC CTL (ATC) FAC. ACFT MUST BE SQUAWKING THE DISCRETE CODE PRIOR TO DEP AND AT ALL TIMES WHILE IN THE TFR AND MUST REMAIN IN TWO-WAY RADIO COM WITH ATC.
Or for the smaller TFRs:
ACFT MUST BE SQUAWKING AN ATC DISCRETE BEACON CODE AT ALL TIMES WHILE IN THE TFR AND MUST REMAIN IN TWO - WAY RADIO COM WITH ATC.
In either case, it doesn't have any language about "Unless authorized by ATC." You need to have a discrete squawk code at all times in the TFR. ATC should not have told the pilot to squawk VFR, and the pilot should have refused the code change.