Why does --release reads my .env.dev values instead of .env.prod values

Hey, this is my first release of an ionic APP, when I am fininshed creating the build for the APP while i run the build without the --release ionic cordova build android --prod it reads my .env.prod values properly (.env.dev and .env.prod contains my server api url and other keys), but when I run with the --release like ionic cordova build android --prod --release, my app was not working and find out that the api url and values was read from the .env.dev file!?? where as the --prod is there it should read from the .env.prod file.

What could be the reason? i know --release only makes the code compress for the play store.

Does anyone else face this issue?