Google Play Protect

When I create an app from my PC which android studio installed there, all works fine.

ionic cordova build android

copy the output apk and done.

But when I’m trying to create an app from a container with a base image of Debian and all SDK tools installed. I also add build.json and create keystore with
keytool -genkey -v -keystore [keystore_name].keystore -alias [alias_name] -keyalg RSA -keysize 2048 -validity 10000

the apk created and all works fine but when I install the app, I get an message “Install anyway”
and if I delete the app and re-install “App can’t installed”. why?