What does your production environment run? Are you using Entity Framework or another ORM like Dapper?
Unlike traditional SQL Server installations—such as Standard, Enterprise, or even standard SQL Server Express—LocalDB does not run as a continuous, background Windows Service. Instead, LocalDB instances are spun up on-demand as child processes of the calling application and are automatically shut down when the connection is idle. How it Works Under the Hood mssql localdb
To help narrow down your development environment setup, tell me: What does your production environment run