How to reproduce:
1. Open the attached project "Test.zip"
2. Export the project for Android platform
3. Go to "BUILD PATH/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput" and look for NativeC.h file
Expected results: NativeC.h is in the folder
Actual result: NativeC.h is not in the folder
Reproducible with: 2021.2.0a18, 2021.3.4f1, 2022.1.4f1, 2022.2.0a10
Not reproducible with: 2019.4.39f1, 2020.3.35f1, 2021.2.0a17, 2022.2.0a11, 2022.2.0a16
Note: The issue also includes the missing Templates folder inside Editor\Data\PlaybackEngines\AndroidPlayer\ so Unity can't find Gradle