Missing assets folder in apk after upgrading Gradle

Hi. I’m using Cocos2d (js) 3.16 with deprecated Cocos Studio (I know it’s bad).
I need to build AAB (android application binary) so I had to upgrade gradle (Android Studio says it’s required to assemble AAB).
I’ve been fixing all gradle migration issues and now there is only one left to resolve.
For some reason final APK file doesn’t contains assets folder.
I tried a lot of recipies found in google but none of them helped.
Can anyone help me?

I can see that assets are copied to app/build/intermediates, then Compile JS stage also completes successfully.