Do you have a link to the game where it let you make an illegal move?
Illegal premove = move in another direction ( 10+ times)?????

If it was your last game today then I didn't see any illegal moves as described.
https://www.chess.com/live/game/1587024456
No, there is no way to PROVE that, no illegal move was ACTUALLY PLAYED, I just premoved an illegal move, and it kept on moving left and right many times in a row as I described : My pawn was on g2 and I accidentally premoved to take my own pawn on G2 with my KING. But instead of nothing happening the king moved f1, g1, f1, g1 a couple of times ( I could not stop it) And in the mean time the opponent got to do what he liked.

Yeah, the game PGN would show if the moves suggested were even possible. For example, if the game was the one I linked to, there was no pawn on g2 because it had earlier taken on f3. The king maneuver was in that game but all the moves were legal.
I won't discount the possibility of a major bug being possible. However, if such a bug was in the code I would expect to see a lot of complaints about it. You also didn't say if you were playing on the site (v2 or v3) or if you were on the app (Android or iOS).

By the time you go Kf1-g1-f1-g1 you have no pawn on g2 - so Kg2 would be legal actually.
Later the opponent took your knight, it is true - however, I still like your chances had you played 41. Kg6!
For example, 41. Kg6! f5 42. exf5 - you will win the bishop for the first f-pawn, then queen your second f-pawn.
Hi, chess.com whoever
So I had this problem in my last game - I accidentally premoved an illegal King takes own pawn on g2, and the king then moved f1; g1; f1; g1 and then the pawn moved to g3. I could not cancel it, it just stopped itself in the end. That resulted the game from going from 100% won to 100% lost. ( with the opponent taking my knight and pawns). So, when you accidentally premove an illegal move, then it automatically keeps on automoving until it decides to stop itself without me having ANY chance to do anything about it??
So, everyone watch the hell out for illegal premoves because you WILL lose if you make one...