expo build:android and expo build:ios is the old way to build your project.
If you use eas-cli, you will not run into this problem. To install eas-cli, run:
npm i -g eas-cli
Then run eas build -p android or eas build -p ios in the project directory.
See Limitations in the Expo documentation for more information.