They assassinated the wrong guy.
Ferdinand was for treating Serbia fairly.
His opponent in the Austrian political circles was Franz Conrad von Hötzendorf, Vienna’s hardliner chief of staff.
But at least Serbia is now admitting that Gavrilo was their guy.
Only took a century..
There is a podcast about this event, the set up to the assassination, etc on Dan Carlin’s site. He quoted someone who made that exact point and then stated it was Adolf Hitler who was quoted.
In the later 19th century the Austrian Empire split itself up into the Dual Monarchy of Austria and Hungary, to mollify the Hungarians. (Who promptly started treating their own minorities at least as poorly as they themselves had been treated under Austrian rule.)
In both Hungary and Austria Slavs and others made up either a majority or very large minorities.
Ferdinand was in favor of splitting the DM up farther, giving the Slavs their own country or countries. As might be expected, this was violently opposed, especially by the Hungarians.
A rogue faction within the Serbian government wanted him killed specifically because his policies might address the grievances of the South Slavs within the DM, and therefore bring an end to Serbian ambitions to break them off and absorb them into Serbia.