Overall I agree. However, the difficulty that I see is when someone attacks a, sometimes nominally, military target in a situation or method where it will unreasonably injure or kill civilians. Or even when the military target is mostly an excuse to target civilians.
I think it can also get less clear when the target is an enemy's infrastructure, industry, or political infrastructure.
If an army unreasonably kills or injure civilians it will most probably be considered a war crime. Committing war crime is not necessarily better than being a terrorist, but it's different.
I think it can also get less clear when the target is an enemy's infrastructure, industry, or political infrastructure.