The updated build number only persists in 1 stage, in the next stage you lose the updated build number, please see https://developercommunity.visualstudio.com/t/updatebuildnumber-does-not-update-build-number-in/561032 for more detail. Either update it each stage by passing it over or re-do what you're doing the first stage. The Environments tab likely shows the build number from the last attempted stage (probably your deploy stages).