When you swap between standing and crouching while the character is currently leaning, the lean is disabled briefly as the character moves up/down, and then applied again once the character has transitioned to the other stance.
This looks very jarring when aiming down sights, and if you are leaning to peek out of cover it will block your view with the object you are standing next to.