Make sure to kill all the sessions manually.
One of the reasons why you could get this error is that there is an active connection via SSMS/ADS/Synapse Studio/Power BI or some other tool which is using that database at the moment.
When you close all the sessions, you should be able to delete the database successfully.
Here is the procedure for SQL serverless pool (aka SQL on-demand).
Step 1: Find the session which you want to kill using query bellow.
SELECT
'Running' as [Status],
Transaction_id as [Request ID],
'SQL serverless' as [SQL Resource],
s.login_name as [Submitter],
s.Session_Id as [Session ID],
req.start_time as [Submit time],
req.command as [Request Type],
SUBSTRING(
sqltext.text,
(req.statement_start_offset/2)+1,
(
(
CASE req.statement_end_offset
WHEN -1 THEN DATALENGTH(sqltext.text)
ELSE req.statement_end_offset
END - req.statement_start_offset
)/2
) + 1
) as [Query Text],
req.total_elapsed_time as [Duration]
FROM
sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) sqltext
JOIN sys.dm_exec_sessions s ON req.session_id = s.session_id
Step 2: Use the value in the Session ID column to kill the process which you want to. For example, if the Session ID is 81 then execute the following command
kill 81
Here is the procedure for SQL dedicated pool (aka SQL DW).
Step 1: Find the session which you want to kill using the bellow query
SELECT * FROM sys.dm_pdw_exec_sessions
where [status] = 'Active' and not sql_spid = @@SPID
GO
Step 2: Use the value in the [session_id] column to kill the process which you want to. for example if the session_id is 'SID210' then execute the following command
kill 'SID210'
GO