Unless we're talking about different features, diplomatic immunity only prevented you from being arrested/picked up by patrols/etc. Your troops are troops, and are dealt with accordingly. I would strongly suggest that anything providing immunity to troops is open to so many abuses that we couldn't close them all.
I thought you meant diplomats troops couldn't be attacked, which I don't like but I do like your suggestion.