Navigation drawer, menu icon changed to Up arrow

I have found a desktop app with a dismissible navigation drawer and secondary levels of hierarchy that require using an up arrow for navigation.

As you know he burger menu should be displayed on all of your top level destinations. When the user navigates to a deeper level, from one of these top level destinations, the burger menu will be replaced by either a back or close icon.

That means a user is not able to manipulate the drawer while Viewing the task which might be a heavy form. For now i came into solution that system could automatically change a navigation drawer to navigation rail at a certain breakpoint so that all data are visible.

Is there easier solution to apply?

enter image description here enter image description hereenter image description here