You're using the classic view for a SharePoint Online list or library.
The Minimal Download Strategy feature is Active for the site.
In this scenario, the Minimal Download Strategy (MDS) isn't used for the document library, and its functionality doesn’t affect the library as expected.
This is the expected behavior in SharePoint Online. This issue occurs because MDS isn’t supported on lists and libraries that use the new experience. Therefore, MDS has been disabled on lists and libraries that use the classic experience so that there aren’t unnecessary redirects between pages that use the classic experience and those that use the new experience.