I think a part of it might be because the Thalmor patrols might be classified as guards from whatever hold they're patrolling in. Delphine might be classified as a law-abiding character, so attacking guards would go against her set morality and she'd turn aggressive against the Dragonborn. This is probably because until you meet her during the quest line, she's considered a citizen of Riverwood, and you know how citizens react to hostile NPCs/ characters. You get a mob of unarmed chicks with dresses and hobos running over to stab or punch the offender to death. Old school street justice! I could be wrong, but I'd bet that that would be the reason behind her sudden bought of lethal hypocrisy. she's not meant to be a follower for long, and since Thalmor patrols are random encounters, it's just one of those things where it would be oddly specific game logic for one character, even if it totally goes against what her character believes.