2004 is arbitrarily point in time. Obama has done exceptionally well in the Midwest and Rust Belt in 2008 and 2012. PA was much closer in 2000 and 2004. The state now just has returned to a tossup state with a slight D-lean. Mr. Trump managed to overcome this lean in 2016 because he tapped into dissatisfaction and faced an opponent who apparently was a bad fit for the region. We'll have to see what happens in 2024 and beyond, particularly with a non-Trump GOP nominee.
Secondly, PA had 2 GOP senators in 2004, which is no longer the case since 2007. Meanwhile, the governorship was traded every 8 years since the 1-term limit was repealed in the 1970s, with the exception of 2014, in which a GOP gov was defeated after a single term.
Midwestern states like OH and IA have indeed moved right in recent years (though OH was always R-leaning), but PA has just returned to normal after Obama.
Pennsylvania has a less-D PVI in 2008 than 2004.
PVI is a meaningless metric. PA "trended" left in 2004 despite Bush improving more than Kerry did in the state.
Bush improve less than he did in NPV.
This comment show how Dem do wishful-thinking of PA still being blue state even it vote more republican than NPV by 3%. They even lost two state office that year.