IMEI has become 0 - how to fix?
[Solved] I read in many XDA posts that IMEI might not be actually lost by installing custom ROM, but it might be just a case that the permission might have been changed.  To verify, see if the IMEI number is shown in boot loader or bar code screen, if so then this is the case. Since my case is also similar, those posts suggested to flash factory image to restore the IMEI. I am not sure why it did not happen when I tried the same with the version that I already downloaded and have flashed already which is ALI_RETAIL_9.0_PPSS29.55-24-2.
Somehow inexplicably this did not work even though I tried to flash many times.
I stumbled on an XDA post which showed me a repository of factory images of various phones and in my phone case (Moto G6 ALI XT1925-13), I found the latest images from here.
From this site, I downloaded latest ALI_RETAIL_9.0_PPSS29.118-15-11-9 image and flashed which worked.
Edit
The above 118 version had was unstable and tried ALI_RETAIL_9.0_PPSS29.55-37-7-6_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip which seems to be okay so far.