This will sound stupid but trust me it will be your automatic windows.
The auto fold mirrors only fold if the windows are fully up. So if the car can’t tell if the windows are up or not it doesn’t fold the mirrors on lock (holding down lock or if a newer car or VCDS/OBD11 programmed the close on one click lock)
So to check which window is the culprit, try the one touch close or one touch open on your windows. One of them won’t work.
Once you know which one needs resetting your laughing. All you need to from memory is wind the window down all the way and hold the button for 5 seconds. Then raise the window all the way to the top and hold for 5 seconds. On the up one you may need to let go once it’s at the top and then hold it closed for 5 seconds. You’ll here a click when you’re doing it.
If the auto close still isn’t working after that it maybe I’ve not quite remembered the procedure correctly. But you only need to reset the window that isn’t working, not all.