I had the same issue on a drone I bought second-hand. He’d only flown it once and decided he didn’t want it, and since I had sent mine in for repair he offered to sell it to me. Come to find out he did have a little crash on his first flight. He was indoors and it got too close to the window.
Anyway, there wasn’t a scratch on it and in my first couple flights I had no issues. However, there was a few times I took it out and while flying the gimbal would very slowing aim downward and I’d have to aim it back up with the angle adjustment on my remote. Then it would slowly aim downward again. On those same days, it would do the gimble reset like described above. I did all the usual resets and calibrations and that didn’t help. Even did it without the SD card in.
I sent the drone in. Their quote was about $150. No Dji Care on this one, so I paid it. A few days later I had a new/refurb unit delivered and haven’t had any problems. As stated above, this is a common problem. And if it makes any difference, he initially purchased this drone about 18 months ago.