Style overrides are maintained when merely applying styles.
The issue with your example is that the style has been redefined twice - once to align everything right, negating the manual override since it now matches the style definition, then again to align everything left.
You've essentially overwritten the manual formatting by redefining the style to match the override, then redefining the style again.
Styles really shouldn't be redefined repeatedly.
That's kind of the point of having styles.
In the question example, I would use two styles - one left aligned and one right aligned.
Or, learn to not repeatedly redefine styles containing these sort of aspects (alignment) once they are set. Simply don't change unique items such as alignment when redefining a style.
You can change universal aspects such as typeface, size, etc. and redefining won't change the manual alignment override. If the alignment defined in the style doesn't change when redefining, then the manual alignment override also won't change.
For 99.9% of all InDesign documents, I strongly recommend one NEVER relies on or uses the [Basic Paragraph] style.
If you need a style, define a new style - as opposed to altering the [Basic Paragraph] style.
You'll find, eventually, using the [Basic Paragraph] style becomes exceptionally problematic if you ever need to copy/paste or otherwise move content from one document to another, or give the document to someone with a different system and INDD installation. Because their [Basic Paragraph] defaults won't match your [Basic Paragraph] defaults.
Using unique style names can prevent a considerable amount of headaches in the future. The [Basic Paragraph] style is reset to its defaults with each and every new InDesign document.