The exception is caused by a failure to connect to the database.
It was using the production connection string because the ASPNETCORE_ENVIRONMENT environment variable was not set in the Developer Command Prompt.
The production connection string uses:
Authentication=Active Directory Managed Identity
The "local" connection string uses:
Authentication=Active Directory Interactive
I set the environment variable:
SET ASPNETCORE_ENVIRONMENT=local
Once it was using the correct Authentication for running from a local computer it was able to connect to the Azure SQL database and successfully scaffold the objects.