The latest software update links the unfolding of the outside rearview mirror on Auto handle present. Previously, the mirror would unfold only if the doors were opened. Now, every time I walk by the car in the garage the mirrors come out which causes an undesired obstacle. In the short term, I have shut off the door handle auto-present.
An update in 2019 provides location-aware folding, which solves the issue in a more elegant way.
I have a narrow garage so I fold the side view mirrors (I presume this is what you mean - not the rear view mirror) before entering the garage and they stay folded until I manually unfold them. This works for me since they don't automatically unfold while approaching the car with my fob and can back out without accidentally hitting the garage door opening with the mirrors.
The car remembers if you manually fold the mirrors and will keep them folded until you either manually unfold them from the driver's door button or you drive 30 mph and they will automatically unfold.
If you keep your mirrors unfolded when pulling into the garage, the software will remember that last setting and automatically unfold the mirrors when approaching the car. So if you want the mirrors to stay folded when walking into the garage, fold them when pulling in and they will remember that last setting.
I'd even prefer to have a setting that unfold the mirros uppon pressing the brake pedal.
Especially now in winter one might have forgotten to turn off folding upon locking the car. So when returning at night e.g. after diner in a restaurant, where it might have frozen the mirrors in fold position, it doesn't do any good when unlocking the car and unfolding the mirrors (or trying to do so).