The "if" is the problem. If it happens, then of course, let AI do it. For the moment AI is still bad at those type of tasks [1], so the discussion shouldn't focus on highly conjectural situations. We can't destroy the scientific ecosystem based on vague speculations.
[1] There are real reasons: it is not obvious how to optimize an LLM for doing basic science or other ill defined tasks. On the contrary, optimizing for writing a proof that passes the Lean test or code that passes the tests is a different story.