Those troops were on a resource tile yielding and your peace treaty does not protect resource tiles it only protects your town. There are domain guards that protect resource tiles
When you lose a battle you always lose 80% of your troops (well they let you keep 20% is more accurate) ... and you do not know how many troops the person had ... you only know how many they lost which was 2759 ... they could have had more troops than you. Also they have higher influence so there is a good chance that they have done more military knowledge so that their troops are stronger than yours.