Well I have just had a vision error, hardware fault contact DJI etc, I diid all the testing, recalibration, downgrade firmware, upgrade/refresh firmware, the downward sensors still would not work.
I removed the gimbal cover plate and checked all the connections and still it did not work.
Eventually I had to conclude there was indeed a hardware fault.
I managed to buy the sensor module from someone who was parting out a P4 and fitted this to my P4, and problem solved.
Not saying this is your problem, but after you have eliminated all the possible software/firmware problems, then whatever remains, however unlikely must be the cause. ( Apologies to Sherlock)
If you do have to replace the module, it is not easy, unless you have very small fingers.
Sorry this is not much help, but I spent a week trying to sort mine out, it is very frustrating.
Good luck, hope you are flying again soon.