At a time like this, this seems odd. Even during peace buying S400 was much discussed as to sanction India.
Believe it or not, the general consensus amongst nations is that sanctions on Russian energy products are not legal and are a form of extraterritorial reach by the US. And the ones most vehemently against the CAATSA are members of the European Union. Well, and the POTUS at the time, Donald Trump. As crazy as it sounds, Germany described the sanctions as illegal under international law and urged the EU to retaliate against the US. That is obvious nonsense, but there are probably reasons for them to do so.
First off, Europe for the most part is energy dependent on Russia since it is the closest large supplier of fossil fuel. Second, they were likely just trying to play politics and garner anti-US sentiment since Donald Trump was president at the time (which, is ironic since he was against this law and obviously pro-Russia). The US population and congress at the time (and also now) were very anti-Russia (likely due to the ongoing investigation into Russian interference in the 2016 election, and the Trump campaign's alleged ties to Russia). That aside, there were a lot of projects, such as the Nord Stream pipeline 2, that would have been a costly mess to stop if they had adhered to the sanctions. The US, Western Europe, and Eastern Europe seem to have a lot of varying opinions on the pipeline (to which of course the US is not a participating party so whose opinion is often ignored). But you can clearly see that in the last few years, that is after the first Russian invasion of Ukraine in which they annexed Crimea, the EU collectively decided that economics was far more important than politics and they are willing to overlook certain Russian behaviors.
One can speculate that the plan was to create a co-dependence relationship which they can use as leverage to control Russia's behavior. Obviously, that did not happen and is in fact a severe weakness in Western Europe (particularly Germany) today. You may have noted that in the listed sanctions, they specifically do not include one of Russia's main sources of income (oil, natural gas, etc.). That is because the POTUS knows that Europe (collectively) will never agree to sanctions on Russian energy and likely why the US ban on Russia oil is a separate thing and only applies to US companies.
So to directly answer your question, India can continue to buy Russian oil since there are no recent sanctions on Russian oil, and the ones from 5 years ago were hotly contested by the US's closest allies so it is ignored and effectively have no teeth. Also do note that there were generally not the same reaction to the other countries listed in the sanctions, with the exception of the target of the sanctions.
All the unilateral sanctions legally have national scope. On the international stage they have no legal value and the only way to enforce them is by pressuring the people involved behind closed doors. Public calls to respect those laws obviously backfire because they appear as an interference by a foreign country, they upset the local population and they encourage them to do the opposite.
So, if the US really want to enforce some sanctions on the international stage you see few signs. E.G.:
- When the US began to threaten CEOs of foreign companies under the term of the Helms Burton very scant information filtered to the media.
- When the US fined the European banks for breaching US sanctions against Iran the media initially made a lot of confusion between international sanctions and US sanctions, then they tailored the reporting in a careful manner in order to reduce the backlash.
- Nobody knows why Russia and China never followed up to their promise to invest in Venezuelan oil infrastructure and let it fall into disrepair.
So, if you want to understand why some sanction are enforced and some are not you have to evaluate their attitude. If the actions are limited to public declarations and nothing happens it means that enforcing those sanctions is not in the US interest, they only use them to appease the public.
Coz, India is paying in Rupees.