For most studies using RECIST, surgery or radiotherapy prior to progression would be a major protocol deviation. If this is foreseen as a study procedure (i.e., you know this will happen and are allowing it) then the protocol should explicitly state how this will be handled for the interpretation of response.
In principle, these lesions will no longer be part of the assessment. This creates the situation of missing assessments: when no imaging/measurement is done at all at a particular time point, the patient is not evaluable (NE) at that time point. If only a subset of lesion measurements are made at an assessment, then usually this is also considered NE at that time point, unless a convincing argument can be made that the contribution of the individual missing lesion(s) would not change the assigned time point response.