Issue with non transitive R class migration

I want to run the non transitive R class migration for my project. As of now I can only do that with Android studio action Refactor > Migrate to Non-Transitive R class… But we have react native code as well which is hosted in npm repository and get added as node_modules post running npm ci command. Hence, in our CI/CD, build fails because there are R class references in react native libraries which can’t be changed.

For example, react native uses an open source library named react-native-screens where R class is referenced in ScreenStackHeaderConfig.kt class

Can I add android.nonTransitiveRClass property for certain android modules only?