No. There is no mechanism by which playing video games causes a person to forget material learned in school.
What games do compete for is time and attention, and that is a different issue. If a game displaces homework or revision, the knowledge fades from disuse, not from anything the game does to memory. Plenty of players manage both without difficulty.
In many cases games are actively useful. They can be genuinely relaxing after a demanding day, which helps concentration later, and some titles teach history, geography, logic or a second language more engagingly than a textbook manages. The honest framing is that balance matters, not that games are harmful in themselves.