Checking the built APK instead of the manifest you wrote is a good catch, merged library manifests bite people. Did you wire that aapt2 check into CI so a new dependency can't quietly add INTERNET?
Not yet, it's still a manual step before each release. The obvious next step is a small Gradle task that reads the merged release manifest and fails the build if INTERNET shows up, so CI catches it before I ever see an APK.