These inflation numbers are from February, before any real sanctions had any effect on prices.
This is a clear case of political opportunism and a way to deflect something that was a near-crisis before the Russian invasion. Yellen is speaking today at 4 pm ET on CNBC and will likely take the same line.
The administration is going to try to use this war as a 'get out of jail free' card on inflation but I'm skeptical that will work. People are fired up now but won't be forever. Economics wins elections.