You were on the right track, but the entry TargetArmLength = FMath::Clamp(TargetArmLength, Min, Max); limits the value only once and assigns it to a variable.
In order for the value of a variable to be limited every time we change it, we need to catch the moment the variable changes, here’s how we’ll do it:
In the unreal engine, almost every class of various kinds of objects has a PostEditChangeProperty() method; it is called every time any variable of the object changes. By inheriting a class from USpringArmComponent you also get access to this method in your class, you need to override this method by writing it in your class.
By default, this method takes the data structure of the variable that initiated its call, and we can get its name and compare it with the name of the variable we need - if they match, then the desired variable has changed and we can limit its value: