The issue is that this service is registered as scoped
builder.Services.AddScoped<IUnitOfWork, UnitOfWork>();
It needs to be a singleton for the background worker.
If you need the lifetime to be scoped for UnitOfWork, read up here on how to create a scope within your worker. https://learn.microsoft.com/en-us/dotnet/core/extensions/scoped-service