In this case it's easy because there's no effect.
The sort of argument you're making above has become common in threads like these, but it's based on what looks a bit like template/pattern matching rather than logic. See also the comment below by ltbarcly3 which is correcting another instance of this. I noticed this problem crops up in COVID threads a lot.
Confounding factors matter when there is a correlation and you're trying to explain causation, because it means you might infer causality wrongly when in reality there's a confounder that explains it differently. Confounding factors are irrelevant when there's no correlation to explain, unless you posit that there actually is an effect but a confounder perfectly balances it out in the opposite direction. If you go there you'd better have really good evidence of it because (a) that's quite unlikely a priori and (b) that evidence is all that would stand between you and hallucinating things that aren't real.
In this case there is no effect to explain. Neither masks nor lockdowns have any observable effect on outcomes and this has been demonstrated six ways from Sunday, from the start of COVID. A lot of people desperately struggle to accept this because of what it implies about the honesty and competence of public health authorities, but the fact remains that these interventions had no effect and there are many studies showing this. You don't really need studies of course. Just looking at case graphs is enough to see this for yourself, because mask mandates were justified on the basis that they'd have a big impact on those graphs. When they don't do that reliably, it automatically means the policy is a failure. It's still nice to rigorously characterize the lack of effect, though.
Because there's no effect that means "correlation doesn't imply causation" is an invalid argument, it means "but real world data can be confounded" is irrelevant because there's nothing to be confounded, and it means a whole lot of other arguments that crop up in discussions of bad science are irrelevant. All these things are common objections to bad science because academics are so keen to announce effects in data that aren't real. They're therefore possibly valid objections to studies where masks or lockdowns are claimed to create real effects, but they aren't valid objections to studies supporting the null hypothesis.