In addition to what you've done, you need to tell Vite to add the nonce in the middleware via Vite::useCspNonce().
This is from the laravel docs:
Vite::useCspNonce();
return $next($request)->withHeaders([
'Content-Security-Policy' => "script-src 'nonce-".Vite::cspNonce()."'",
]);
For convenience, it's also worth using Spatie's package: https://github.com/spatie/laravel-csp