Laravel auth()->id() not working in prod server
you need to double check multiple things:

what session driver are you using?
what is the queue driver are you using?
is your middleware runs after session and auth middleware runs ( based on the configuration in kernal.php )

based on your question and the problem is happening only on production so probably your issue is communication, your queue handler can't access session data which is usually the case if you separate them into different modules and connections to improve performance so to achieve this you need to pass the information you need from one module to another so in your case
public function handle($request, Closure $next, $logType)
    {
        $response = $next($request);
        $userID = auth()->id();
        CreateLog::dispatch($request, $response, $logType, $userID)->onQueue(config('queue.queues.logging'));
        return $response;
    }

and in your CreateLog you store this userID and use it instead of depending on the auth

I have one seperate database for saving logs
I have middleware that saves every request with response
 public function handle($request, Closure $next, $logType)
    {
        $response = $next($request);
        CreateLog::dispatch($request, $response, $logType)->onQueue(config('queue.queues.logging'));
        return $response;
    }

Everything related to auth progress works after every work complated. beacuse u used         $response = $next($request);
'user_id' => auth()->id(),

Trying to save user_id like that. Everything is working perfect
But in prod server user_id is being null
In prod server project running using docker
