Use the appropriate language tag in code block info string, even though this forum doesn’t support many other languages. How to post in the Questions category
scale.factor is a shorthand, as explained in the docs, and it’s a bug that auto is documented as possible value (needs to be reported). auto for x/y will just copy the same non-auto value of the opposite axis. This is the only auto behavior.
You can open a feature request, though it kinda sounds like a complicated one and not much practical purpose other than fixing what can’t be fit by default, which is a rare case.