While facing a trouble dropping a Login account, use the below script:-
Server principal 'xx\yy' has granted one or more permission(s). Revoke the permission(s) before dropping the server principal. (Microsoft SQL Server, Error: 15173).
Run the above steps.