A big problem for Hungary was that they had no veto when it came to the Empire’s foreign policy. So the Hapsburgs were able to drag the Hungarians into WW1.
Disclaimer: But once in the war, the Hungarian leadership got as greedy as the other powers. After some initial military successes, the Hungarians started to plan the annexation of neighboring territories.
That sure didn’t work out well in the long run.
And the Hungarians tried sucking up to Hitler to try to get those territories back, especially Slovakia, but Hitler said “Nein!”