Thanks for the Question and using Microsoft Q&A
As per my understanding, you are facing error, when you are trying to delete the SP role after creating database and schemas.
As roles can own database objects and can hold privileges to access other objects, dropping a role is often not just a matter of a quick [DROP ROLE] Any objects owned by the role must first be dropped or reassigned to other owners; and any permissions granted to the role must be revoked.
Please refer to this Documentation that might help you: https://www.postgresql.org/docs/16/role-removal.html
Hope this helps. Do let us know if you any further queries.