The key point was that energy and food prices soared in May and June 2022, and as those data points are removed from the year-over-year calculation, the YoY change will decline sharply. However, core inflation does not include food and energy, so we won't see as dramatic a decline in core CPI and core PCE.
I posted this table showing the month-over-month changes that would be removed.
I've added the May CPI numbers, and an estimate from BofA for the May PCE numbers.
As the large increases in June last year are dropped from the year-over-year calculation, the YoY change will decline.
This is also why we look at the most recent months - not just year-over-year.