This is what you need to do to achieve the desired result.
```xml
<com.google.android.material.navigation.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:insetForeground="@android:color/transparent"
app:menu="@menu/toolbar" />
```
- You must add the insetForeground
```app:insetForeground="@android:color/transparent"```
Here is the actual solution to the problem:
```xml
<com.google.android.material.navigation.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:insetForeground="@android:color/transparent"
app:menu="@menu/toolbar" />
```
- You must add the insetForeground
```app:insetForeground="@android:color/transparent"```