I'm creating a React Js app using MUI as the core component and React Leaflet as the map container.
There is some extra blank space (a UX issue) with the React Leaflet map after when the MUI Drawer is collapsed.
Here is the initial condition (the MUI Drawer component is expanded)

Here is the screenshot after clicking the collapse button for the MUI Drawer component from the MUI AppBar component (the extra blank space appears on the right of the screen)

Why does this happen and what is the solution for this issue?
Here is the code and the playground: https://codesandbox.io/s/stackoverflow-leaflet-map-with-mui-drawer-9c6ner
Note:
- I have to use
react-leafletv3 andreactv17 dependencies because in my real project, I have to usereact-leaflet-markerclusterv3 dependency which is not supported yet withreact-leafletv4 andreactv18 - If this issue isn't reproducible in your browser, please try to enlarge your codesandbox browser and then try again.