Well, the best way to do this, is to drive safely. But there are ways to get a better rating in case you fall under a 2.0 rating because of one or two bad races. That happened to me when I had not enough time to train during the week and in the race I was just a bit too often outside the track limits.
If you need a better rating in the road class you can drive an endurance race on the Nürburgring. You have to train a bit to get to know the track but there are so many turns that, over a 3 or 4 hours race, even twenty or more incidences will not harm you.
But if you want to avoid other cars, you can do timetrial sessions. There you have no cars around you and you can drive as fast or slow as you want. You have 30 minutes and the more incident free turns and laps you make the better will be your safety rating.
But there is a downside. It’s boring. So I wouldn’t recommend this unless you need just a bit more rating to get to a higher class or you want to get over a 2.0 rating again, or you really like timetrials.
And to make this clear, if you are losing safety rating not because you are a bit too often outside the track limits but because you have contact with other cars, I would strongly recommend to learn how to drive better.