you may try to export files and folders via Powershell: https://www.sharepointdiary.com/2018/08/sharepoint-online-powershell-to-get-all-files-in-document-library.html
How do I export a list of folder names and file names from sharepoint document liberary to excel?

I have a mac and when I export , It only shows the highest level folders in the document library.
1 additional answer
Sort by: Most helpful
-
Li Zhang_MSFT 1,556 Reputation points
2021-02-24T08:16:35.25+00:00 Hi @madameh2o ,
I could reproduce the issue on mac. Currently, I think this is the OOB behavior.
I suggest you go to SharePoint UserVoice to post your idea.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.