If Country A is spending 10% of it's GDP on 10 things, Country B cannot possibly outspend it in every category as a percentage of their respective GDPs, because "percentage of GDP" is always a 100-point scale.
If you go up one percent in one category, you have to go down one percent somewhere in the other categories.