Gene-environment interactions (GxE) have been shown to explain a non-negligible proportion of variance for a plethora of complex traits in different species, including livestock, plants, and humans. While several studies have shown that including GxE can improve prediction accuracy in agricultural species, no increase in accuracy has been observed in human studies. In this work, we sought to investigate the reasons for the contradictory results between agricultural species and humans. Model organisms are useful for studying GxE, since environments can be controlled and genotypes can be replicated across environments. Thus, we used data from a previous study in Drosophila melanogaster, where the authors measured lifespan in different environments and found evidence of GxE. We devised three different cross-validation (CV) scenarios that mimic the relationships between reference and test populations observed in agriculture and human studies, and fitted a few statistical models with and without including GxE. The results showed that GxE explained 8% of lifespan variance. Despite that, models accounting for GxE improved prediction accuracy only in CV scenarios where the same genotypes are observed in both the reference and test populations. While these scenarios are common in agriculture, where individuals of the same family or variety appear in both populations, they are not encountered in human studies, where individuals are unrelated. Thus, our work clarifies in which prediction scenarios we can expect improvements by incorporating GxE into statistical models, and provides an explanation for previous results found in studies involving human populations.