Deos the game end immediatelly once someone achieves the end goal?
No
If you have no more empty potion bottles, and all of your wizards are in Ravenskeep, you trigger the end of the game: Finish the round, so everyone has had the same number of turns.