I think the answer is simply both. He wanted to be both
Him letting Luffy punch his was the closest thing he could do to treason showing he wouldn’t commit ACTUAL treason himself
To him, that’s a win-win situation because he let his grandson save his other grandson while not technically betraying the WG.
In fact Garp was legitimately ordered not to participate or do nothing in the first place and guess what? In that exact moment he did what sengoku ordered him, not to get involved
But he definitely cares though
He even cried telling ace he wished him and his brothers chose a different path in life aka the path of the marines