Hi Alessio,
Do you mean after you change the UPN for local users, cloud UPN is not updated? Generally, it is not an expected behavior. The issue may occur when these user objects are not synced from the AD DS schema to Office 365 correctly during directory synchronization. Could you try the following steps to see if it works?
1. Manage Windows Azure AD using Windows PowerShell
2. Run the following cmdlet:
Set-MsolUserPrincipalName -UserPrincipalName oldname@domain.com -NewUserPrincipalName newname@domain.com
3. Force directory synchronization.
Regards,
Johnny Zhang