It seems clear enough that both things are true.
I'm far from any sort of expert in psychology, so I'll like mix up ideas or terms and am open to corrections. But this guy seems like a sociopath. He not only turned himself in, he calmly announced that he'd have murdered Gov. Shapiro had he been given that opportunity.
I'm sure Gaza played a key role in his motivation. But somebody as deranged as this could've been fixated on anything.
Years ago, former Evansville mayor Russell Lloyd (he'd only been out of office for a couple months) was murdered at his house by a woman who was pissed off about a building inspector coming to her house to inspect a renovation she'd done. She mistakenly thought he was still in office -- and this was her motivation to find out where he lived, ring his doorbell, and then shoot him when he answered.