Learning by invention is also my favourite way to learn.
However, I find it rather unappreciated among both teachers and textbook writers. What is usually done is the result is presented on a silver platter to regurgitate and reproduce, and important details are glossed over in favour of 'simplicity', creating a (dangerous) knowledge gap.
You remind me of something a Physics professor once told me.
He said (I'm paraphrasing) "when you get to really learning the Physics, it's not an incremental logically consistent picture rooted in mathematics like in the textbooks. It's mostly a bunch of little tricks that you learn when to apply, and sometimes you get somewhere."
He wasn't making a pedagogical point, but I wonder if being compelled by the "learn by invention" style is in some way detrimental to learning how to solve hard novel problems.
To be fair, 'Learn by invention' can be detrimental if one is trying to derive a result which requires significant prior knowledge that the learner lacks. However, quoting a simple physics example of what I mean: One can prove the Work-Energy theorem with simple manipulations of the basic definitions of displacement, velocity and acceleration without having to learn it like a law. One cannot derive Newton's three laws, on the contrary.
Most of physics is not a great counter-example to learning by invention. There are several ways to derive Newton's three laws. It's a fun exercise in Lagrangian mechanics.
Perhaps quantization or the curvature of space would be better examples as they require prior knowledge of experimental data (assuming we ignore proposed philosophical arguments that stray a bit too far from physics imho.)
However, I find it rather unappreciated among both teachers and textbook writers. What is usually done is the result is presented on a silver platter to regurgitate and reproduce, and important details are glossed over in favour of 'simplicity', creating a (dangerous) knowledge gap.