Prevent THREADPOOL waits due to idle worker thread trimming
The trace flag is 8061.
It is undocumented, so should only be enabled when suggested by Microsoft support.
The flag needs to be enabled globally (or on start up):
-- Enable globally
DBCC TRACEON (8061, -1);

SQL Server checks to see if it should trim idle workers in:
sqldk!SchedulerMonitor::CheckScheduler

It skips routine excess worker trimming if trace flag 8061 is set.
Worker trimming is performed by:
sqldk!WorkDispatcher::TrimIdleWorkers

Worker trimming will still be performed if the following memory value is greater than zero:
sqldk!SOS_OS::sm_WorkerPressureCount

Quite rightly, the trace flag will not prevent trimming under all scenarios, but it does work for the purpose expressed in the question.