If memory serves right, you will need to fix the partition map before flashing the stock OS. Also this should fix the EFS issue you are facing - loss of wifi and imei.
i may know someone with an A2, let me see if I can help out.
Finally, chatgpt is not perfect, check and do the steps. like...