If you’re gonna bring up class interests, war in general (both defensive and offensive) is not in the working class interests, with geopolitical aspect being pretty much irrelevant.
If the war is offensive, the proletariat are the ones dying on the battlefield to further their imperialist bourgeoisie ruler interests.
If the war is defensive, the proletariat are the ones dying on the battlefield to protect the private property and the rule of their bourgeoisie rulers, and win or lose - the class relation will remain the same.