There is the thought that in some cases IMS registration (if the primary issue) can only happen successfully on Stock ROM as it is speculated that this registration is written to a firmware / proprietary or other partition unused by AOSP install and likely inaccessible to /e/OS Settings.
I did not find the thread, I think an Xiaomi and @tcecyk you were involved?
Ahh … Redmi 4x - installation e/os not available? - #4 by AntonioA