In the same way as Yandex is Dutch and Kaspersky actually used to be British for some time. Where the holding company is registered is not that important these days
They had to suspend the R&D they did in Russia due to Ukraine, but I'm surprised they were able to keep it over there for so long given the other perils of having employees over there (that law which forced most American tech companies to close their R&D centers a decade or so ago).