The issue is that the logout link is being clicked, which sends a GET request, instead of submitting the form, which sends a POST request. To fix this, you can modify the code to submit the form directly when the link is clicked, instead of relying on the link to submit the form. Here's an example:
<a class="dropdown-item" href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
{{ __('Logout') }}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
@csrf
</form>
This code adds an onclick event to the link that prevents the default behavior (following the link), and instead submits the form directly. This ensures that a POST request is sent to the logout route, which is what the route expects.