Hello, this is my first post. I just created an account to thank you .
You saved me not only hours but days!
Based on your description I understood how the same problem occurred in my server.
I have a main wordpress site with 10 domain aliases. I needed to restore a backup, but it wouldn’t restore unless I deleted the website in Cyberpanel. After I restored the website and added new alias, I had 404 on some of my alias domain. Thanks to your instructions I found that in “Webadmin console” → Listeners → General, not all alias domains from Cyberpanel where present. After adding them manually, the problem was solved.