I had a problem of changing an IP address of just one of the few addon domains on a cPanel/WHM account, but I managed to find a solution (by manually editing A records in DNS zones of the main account and the addon domain, and changing the IP in /var/cpanel/userdata/username/addon.domain.com).
However, this addon domain (example.com) also had a subdomain attached to it (sub.example.com), so I replaced the IP in the A records for it too, and I also changed the IP via SSH in the above mentioned path.
Now both example.com and sub.example.com are correctly resolving to the new dedicated IP and that's okay. But when I type this IP address in the browser, it loads the sub.example.com website instead of the main example.com website.
I have no clue as to why is this happening. How do I change the main (primary, default) website of a dedicated IP address?