Wrong question.
Would it have been tracked from shortly after take-off until it left radar cover - yes. It would have been identified as a friendly based on it's SSR squawk and associated flight plan and had a friendly track label associated with it which would have stayed with it based on primary radar when the SSR was turned off.
Would the fact that the SSR was turned off and the aircraft then turned back have caused an alert? Perhaps. It was already identified as friendly and the turn back could have been assumed to be related to an aircraft electrical problem; however a prolonged deviation from the flight plan route should have triggered at least a conversation with the local ATC centre as to the problem and intentions.
Once over land it probably entered a no-track area (spurious plots associated with ground clutter and local movements are a nuisance) and the track label would have been automatically dropped. From that point it would have just been another assumed friendly overland track.