This is an expression that is mostly used in the context of sports. In the first test match, for example, England had the rub of the green on the fourth day. The Indians fielded poorly and dropped a few catches. Even some of the umpiring decisions went England’s way. The visitor’s seemed to have all the luck.
When you say that someone has the rub of the green, what you are implying is that everything is going their way — they have dame luck on their side.
*Ananya hasn’t had the rub of the green in the last few tournaments.