There are plenty of games that have followed book lines that are duplicates and I'm sure there are other instances of normal games doing someting similar. That being said, other than my correspondence games, most of my games have deviated from ny larger database of games between move 10 and 15, and that is out of a few million games played.
Has a game ever been played twice?

Oh yeah. 4 move games and similar will obviously be played over and over again. But I believe theEnt meant longer more opening/theory based games

Yes frequently, not just the various well known opening traps but also GM draws where two players agree to split a point for some cash or other advantage.
Also on the same idea some players have been known to buy a point from an opponent so that they make an IM norm.

myriad58 is right. I know that shorts have been played hundreds of times, and opening traps the same. I mean like actual game. Preferably grandmaster games.

Remember when 2Q1C posted a loss vs VladimirHerceg91 and wanted to know how well he played and where could he improve? Then I was determined it was an exact move-for-move copy of a game between Bobby Fischer and Robert Byrne for the first 21 of that game's 25 moves:
2Q1C vs Vlado: https://www.chess.com/daily/game/158680109
Byrne vs Fischer: https://www.chess.com/games/view/117100
Apparently Opening Explorer is what played well!
Of course, the shorter the game, the more likely it's be played often, especially games like the Scholar's Mate, games involving the Classic Bishop Sacrifice at h7 or h2, etc.

Remember when 2Q1C posted a loss vs VladimirHerceg91 and wanted to know how well he played and where could he improve? Then I was determined it was an exact move-for-move copy of a game between Bobby Fischer and Robert Byrne for the first 21 of that game's 25 moves:
2Q1C vs Vlado: https://www.chess.com/daily/game/158680109
Byrne vs Fischer: https://www.chess.com/games/view/117100
Apparently Opening Explorer is what played well!
Of course, the shorter the game, the more likely it's be played often, especially games like the Scholar's Mate, games involving the Classic Bishop Sacrifice at h7 or h2, etc.
I remember that game. Quite a performance by me.

I was just thinking about this and wondered: how many moves do you have to go before you're officially in unknown territory? Obviously, low-move games will have repeats, but there must be a maximum number of moves for that to happen. To take the 21 identical moves from Vlado and Fischer, are there any two games where there are 22 identical moves? 23? Is there some sort of equation that shows for n number of moves, there's a p probability that it will be repeated in t amount of games? Just curious if anyone has encountered this.

Woah! That's so cool, can you link it?

Only 10 moves long, but I have played the exact same game twice against the same 2400 opponent months apart.
game 1:
game 2:

I’ve played the same game several times since posting this.

Woah! That's so cool, can you link it?
You can search my games in Explorer and find all fifteen games. Several follows Greco.
Do you guys know an instant the same exact game being played twice be different people, with no connection between the games. I'm not sure whats the probability of this happening is, but it is clearly possible.