HI. Good you got your bird back okay. This has happened to me twice. First time was late in the day... foreign country (unknown place) getting low on battery and quite scary.
Second time was not so long ago on a beach and not too far away. After the first time I thought long and hard and finally figured out was going on. Second time I pretty much knew what was going on. the sun was about in the same position in the sky as the 1st time actually. 1st time I was up pretty high... 100 metres or so... I changed altitude and it went away. 2nd time... I knew what the problem was... I turned it 45 degrees and fly it home sideways, so the camera was not facing the sun. I know you can turn off the sensing etc. but... turning away from the sun and flying backwards or sideways is a quick fix.