Comparative study between discrete and continuum models for the evolution of competing phenotype-structured cell populations in dynamical environments