This is the way I normally create things. This is also the way required for components to show up on the blueprint component panel. Please test if this replaces the original component or adds a second one though.
You need to pass the class as a template parameter in SetDefaultSubobjectClass like so: ObjectInitializer.SetDefaultSubobjectclass<UMyProjectChacterMovementComponent>(CharacterMovementComponentName)
The Modular body component was from my project, so don’t worry about it, you can remove that line
If you use that constructor to set the class of a subobject, the subobject will be of the new class, in blueprint at least. That means that the original Character Movement component in your blueprint will be of the selected class, you don’t need a new variable of the custom type. If you do want to cache it for C++ access, then you need to cast the already existing character movement component to your class and save it in CustomCharacterMovementComponent. But you can use the templated version of GetCharacterMovement in C++ to get it cast to your custom class
Also, Edit specifiers are of no use for object instance properties, since you can’t assign an instance in a blueprint
But if you select the already existing movement component in your blueprint you should be able to see your custom component properties, just as you would expect