Above all, you need to define sharing mode for inner classes separately, since they are separate classes in terms of inheritance.
consequently you should declare inner classes with the requiredmay use inherited sharing mode seperately.since winter 19 to avoid issues
https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_apex_inherited_sharing.htm