Cooking bonuses subtract from the Realm the moment you enter rather than when you leave.
This means they last for 1 Realm less than indicated. Zoning into a Realm with 1 Realm left on the buff immediately removes it.
Cooking Buff states it lasts 3 Realms
Zone in Realm 1. Cooking buff now states 2 Realm left
Zone in Realm 2. Cooking buff now states 1 Realm left
Zone in Realm 3. Cooking buff is now removed.