It looks like you're dealing with a common issue when setting permissions in the SharePoint document library by using Graph API. By default, new permissions added to a root folder are inherited by subfolders, even if inheritance is broken. This is because the "Share everything in this folder, even items with unique permissions" option is selected by default.
Per my research, there isn't a direct way to pass the value of this checkbox via a Graph API request. In the "Send a sharing invitation", there are only following paraments can be set in the request.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.