Same exact thing happened to me... I immediately hit RTHI had a flight that did the same thing. And like OP it was my fault. I calibrated and got an error (on cement with embedded metal for decor) so moved the bird 2 feet away and redid calib....it worked but really i should have moved 10ft behind me to the grass area. Anyway started flight and everything was normal and as i started to bring the craft back i started getting the error. Panicked but it didn't drift crazy or anything....luckily got it back without a problem but it was pretty windy close to 20mph so i was glad to not have to fight a compass giving incorrect info.
I think a good word of advice here is not to calibrate the compass near metal or concrete ideally. I only calibrate my compass if i'm say more than 30 miles from where i last calibrated and never had any issues with my fc40, 2x vision+ or the P3P, if you do need to recalibrate just go somewhere nearby where its clear and do it there.
I've never calibrated any compass near any metal or concrete, just asking for problems. Only calibrated the P3P compass twice since i had it and 13 flights now, first time when it was new and then when i was greater than 30 miles away although even then it said it did not need it.
Also if you did get a "compass error" on launch there is probably magnetic interference nearby, move away.
I didn't calibrate the compass near any metal or near where the craft lost its signal and flicked to P ATTI.