If the first position has enough passant as a condition, it doesn't matter if it was possible, just that the condition was (the FEN contains the en passant field). Thus it does not count as a repetition.
My guess is that's not likely to be changed. There are likely very few games where that type of position exists condition exists
The following game is not marked as a draw by threefold repetition, even though the final position is repeated three times:
The game starts from the position:
4k3/4r3/8/4Pp2/8/8/8/R3K3 w - f6 0 2
Although there is an en passant target square, it is not a legal capture because the pawn on e5 is pinned.
After 2. Ra2 Rd7 3. Ra1 Re7, we reach the initial position again:
4k3/4r3/8/4Pp2/8/8/8/R3K3 w - - 4 4
After 4. Ra2 Rd7 5. Ra1 Re7, the position appears for the third time:
4k3/4r3/8/4Pp2/8/8/8/R3K3 w - - 8 6
However, the game is not being marked as a draw by threefold repetition.
In another example involving threefold detection and en passant—but without a pinned pawn—Chess.com handles it correctly.
This game starts from:
4k3/4r3/8/5p2/8/8/8/R4K2 w - f6 0 2
In this case, Chess.com correctly identifies that en passant isn’t a legal move, because there’s no pawn available to make the capture.
After 2. Ra2 Rd7 3. Ra1 Re7, the initial position repeats:
4k3/4r3/8/5p2/8/8/8/R4K2 w - - 4 4
After 4. Ra2 Rd7 5. Ra1 Re7, the position appears a third time:
4k3/4r3/8/5p2/8/8/8/R4K2 w - - 8 6
According to FIDE rules:
"Positions as in (a) and (b) are considered the same, if the same player has the move,
pieces of the same kind and colour occupy the same squares, and the possible moves of
all the pieces of both players are the same.
Positions are not the same if a pawn that could have been captured en passant can no
longer be captured in this manner. When a king or a rook is forced to move, it will lose its
castling rights, if any, only after it is moved"