But it would
Rust/whatever is not a magic bullet
Rust / Go / Modern Language X is not a magic bullet for every problem, but it sure seems to be a magic solution for this very problem which occurs incredibly often and is easily fixed by avoiding archaic languages for security critical stuff.
It's also particularly silly since there are plenty of reasons why a dynamically allocated password could be quite nice.
So yeah, I get that their point is "bad devs will write unsafe code no matter what the language is", this is just a terrible case to try to make that argument.