We cannot keep doing the same thing and expect a different result. [or the definition of insanity sometimes attributed to Albert Einstein: "Doing the same thing over and over again and expecting different results"]
This phrase is overused.
When used in a practical sense, it's just plain false. It's "quasi-opposite" phrases "practice makes perfect" and "if at first you don't succeed, try, try again" are frequently enough true that they make using this phrase in an off-hand, not-carefully-considering-the-context way just sound stupid.
Anyway, you almost never "keep doing the same thing/do the same thing twice" in the real (analog) world anyway (which is why "try, try again" actually works), so using the phrase in a literal is almost always pointless outside of a computer or other non-analog (discrete-state) deterministic environment.