I have had this issue on my drivers side mirror (power fold version) since I managed to hit it on the gate post of the old house whilst reversing on to the drive. Took it all apart, reassembled but never went back to flush, so when it looks like this it is certainly a bent bracket. Like others have said a replacement part is eye wateringly expensive so I’ve never bothered. It still works so will suffice, and it’s been like that for probably around 5 years.