Try to rename it again using Query Editor in Azure Portal.
ALTER DATABASE [XX] MODIFY NAME = [YY];
Do you see any active connections to the database? Use the following query to verify and kill the connections you see.
SELECT session_id, host_name, program_name
FROM sys.dm_exec_sessions
WHERE database_id = DB_ID('YY');
Open Azure Portal on a private window in your web browser, search for the Azure SQL logical server and make a click on the Databases option on the vertical menu.