You will not be given extra points for playing cheater if that is what you want to ask, question isnt clear
Cheater's matches voided

Let's assume, I played someone and won, gained some points. Later on, that same person gets banned for cheating.
I know the games the cheater won will be voided, and points people lost by losing to the cheater will be reimbursed to them.
My question is: Will I lose the points I gained by beating the cheater?

Let's assume, I played someone and won, gained some points. Later on, that same person gets banned for cheating.
I know the games the cheater won will be voided, and points people lost by losing to the cheater will be reimbursed to them.
My question is: Will I lose the points I gained by beating the cheater?
Never, you wont lose points.
The completed games are not voided. However, if you lost rating points as a result of completed game then (if the lost points were few enough games in the past) you will be compensated for the points. As an example, I lost two games (32 points) in a pair of daily games in a match. The match is finished and still shows those lost 32 points, but I also received 32 points back in compensation.
That is (slightly) inflationary because my gains in the intervening games were based on me being 32 points lower rated (so I was getting more points added to the lower rating), but it is not overwhelmingly inflationary. After losing 32 points I went +11, +11, +19, -3 and then received 32 points back (net gain 38) while if I hadn't lost the 32 to begin with it may have instead been +10, +9, +17, -4 (net gain 32).
And to directly address your question I won two daily 960 games against the same player (sequenced as loss daily, win 960 daily , loss daily, win 960 daily) and retained the rating gains from those wins.

And to directly address your question I won two daily 960 games against the same player (sequenced as loss daily, win 960 daily , loss daily, win 960 daily) and retained the rating gains from those wins.
This is exactly what I was looking for, thanks!

But I think if you played someone a year ago who now got banned for cheating, you don't get your points back. Maybe they only give rating points back when the game was played recently
I can’t remember the time window; it may be the last 30 games that the points are reimbursed. I must have lost about 25 points to cheaters in the last few months with no reimbursement.
Most of my rapid games are preferably tournaments because they put a light on this kind of “stuff”.

I know that when someone gets banned for cheating (fair play violation), their matches get voided, so players that the cheater had beaten don't lose rating points.
My question is: do only matches that the cheater won or all their matches get voided? I.e., if I had beaten someone who later got banned, would my won match be voided as well?
What does voided even mean
I know that when someone gets banned for cheating (fair play violation), their matches get voided, so players that the cheater had beaten don't lose rating points.
My question is: do only matches that the cheater won or all their matches get voided? I.e., if I had beaten someone who later got banned, would my won match be voided as well?