Nowadays people throw the term "refactoring" around quite loosely, usually meaning "rewrite" when that was not at all the original meaning of the term!
A little bit like how "vibe coding" quickly went from one definition to another even though people should have known better.
Programmers had a hand in this, sadly: https://martinfowler.com/bliki/RefactoringMalapropism.html
Nowadays people throw the term "refactoring" around quite loosely, usually meaning "rewrite" when that was not at all the original meaning of the term!
A little bit like how "vibe coding" quickly went from one definition to another even though people should have known better.