Section 11302 of the California Elections Code makes it crystal clear - as soon as an office becomes vacant, the recall election proceeds anyway, unless as of that moment there are not enough signatures to proceed to the vote. So the resignation tactic can only be used to stop a recall election while they are still in the signature-gathering phase - it will not work if they have already gotten enough signatures.
California's recall law as it applies to statewide elected officials is, frankly, idiotic (it should be like an impeachment, next officer in line gets the post), but it is designed specifically to stop a shenanigan like you describe. The Lieutenant Governor would become Governor if Newsom resigned, but only subject to the results of the Recall - if Newsom is recalled (despite already having resigned), the person with the plurality on part two of the ballot would become the next Governor.