You will need to drop the database from the availability group then after renaming it add it back into the availability group. Make sure you go to the secondary server and clean up the old database as it will still be there.
Over 12yrs in IT and 10yrs happily stuck with SQL.
- SQL 2008/R2/2012/2014/2016/2017
- Oracle 8/9/10/11
- MySQL 4/5 and MariaDB