There's a linked issue here
This is very similar to https://abp.io/support/questions/5482/Should-not-be-able-to-create-a-user-with-a-username-equal-to-the-email-address-of-another-user, just with the username and email address 'swapped'. Furthermore, the error message in the solution to the mentioned support is generic, ie "An unknown failure has occurred.", which is not informative.
We have tried to write middleware as a workaround for this issue, however ran into problems when dealing with impersonating a tenant/user. Furthermore, the tokens are not revoked if a user is logged in and has "isActive" set false. The suggested behaviour here is that such a user should be logged out and that their tokens are revoked (Note that we are using OpenIdDict tokens).