Genotype by environment interaction (G×E) may exist for traits that are expressed in different environments. The G×E is often ignored in the genetic evaluation of selection candidates. We hypothesized that genetic gain in 2 environments is always higher when the true value of the genetic correlation (rg) between traits expressed in different environments is considered in the genetic evaluation. We tested this hypothesis by stochastic simulation of dairy cattle breeding programs in a mainstream and a niche environment. The rg was varied from 0 to 1 in steps of 0.1. We simulated the following 3 scenarios: 1Trait_1Index, 2Traits_1Index, and 2Traits_2Indices. The G×E was ignored in the genetic evaluation in the scenario with 1Trait and included in scenarios with 2Traits. Selection was based on the mainstream selection index in both environments in scenarios with 1Index. Selection in the mainstream environment was based on the mainstream selection index and selection in the niche environment was based on the niche selection index in the scenario with 2Indices. With moderate G×E (rg between 0.6 and 0.9), the highest genetic gain was achieved in the niche environment by selecting for the mainstream selection index and ignoring G×E. At lower rg, the highest genetic gain was achieved when considering G×E and selecting for the niche selection index. For the mainstream environment, it was never an advantage to ignore G×E. Therefore, although our hypothesis was confirmed in most cases, there were cases where ignoring G×E was the better option, and using the correct evaluation led to inferior genetic gain. The results of the current study can be used in animal breeding programs that encompass multiple environments.