Its confirmed , DJI Mavic 3 , other air 3 and mini 4 will error and not fly once sensors are replaced. There is an application that can clear the error and calibrate the new sensors. I do these repairs.
The 40021 error shows you have a new part or parts (the ones you replaced) that do not match the numbers on the Main board. DJI matches numbers with specialized software called Repairtool. It can only be used by DJI. However there are services...