So I figured it out. Thank you @HenkHolterman for your suggestion in the comments, that led to me finding the issue.
In my program.cs I had this line:
`builder.Services.AddSingleton(_ => databaseName);`
Turns out Blazor doesn't like it when you register strings as Singletons... I removed that line and it works fine now.
Cursor thought it would be useful to register the DB name as a singleton so it could easily be used throughout the application. And I failed to catch that.