The separate sovereigns doctrine holds that because the federal and state government are "separate sovereigns", the Double Jeopardy Clause does not apply to prosecution of the same crime under both federal and state laws. The doctrine can be seen in mid 20th century Supreme Court decisions; the 1959 cases of Abbate v. United States and Bartkus v. Illinois ruled in affirmation of the doctrine.
Lets say the Supreme Court rules that double jeopardy rules should apply even if the crime is prosecutable under both federal and state laws. In this case, how could the federal and state governments possibly agree on who gets to prosecute a given crime? Are there examples of other countries solving a similar issue in their jurisdiction?
As an example, lets say Washington state wants to protect its marijuana industry against federal prosecution. It then creates a law mandating a $500 fine for anyone found violating federal marijuana laws. Now anyone who needs to get rid of federal prosecution could just plea guilty to a state court, pay a $500 fine and walk away scot free. The federal government could pull off a similar trick to undermine state laws.