Again, if it's not possible, then you accept the imperfection of the result, or provide better tooling.
There is no blame to put on them whatsoever.
Similarly, they should hire experienced, qualified software engineers to write/check the software in their papers.
They don't because 'everyone can code - its just logic'.
You might be mixing up the terms. I don't think that the point was about "scientists" in general, it was about "data scientists". The first is a common term used to describe someone who does science in some professional capacity. The second one is a very broad job title within software which very often includes writing code that ends up in production - at some data science roles that might even be your main responsiblity.
A data scientist is not even a somebody trained as a programmer. Their strong suit is data analysis, and it turns out one of the tool to manipulate data today are programming languages so their do it.
But I as a Python trainer, I train data analyst regularly, and they don't have a clue about language ecosystems, how the OS work, data formats or reliable software architecture.
They mainly want to output their graph, pdf report or other media to serve their conclusion. They may want to create some reusable algo, or machine learning model, but that's the limit most of them hit.
If one take their code and put it in prod (which I know happens, don't get me wrong), that's not the data scientist fault. They are doing their job, in which programming is just one of the many means to an end, and is not their specialty.
This is like teaching some JavaScript to complete beginners at a bootcamp and then declaring that front-end developers aren't real programmers because they know so little.
I'm not talking about complete beginners. I don't train beginners.