Title 22, Chapter 6, Sec. 254d. - Dismissal on motion of action against individual entitled to immunity
Any action or proceeding brought against an individual who is entitled to immunity with respect to such action or proceeding under the Vienna Convention on Diplomatic Relations, under section 254b or 254c of this title, or under any other laws extending diplomatic privileges and immunities, shall be dismissed. Such immunity may be established upon motion or suggestion by or on behalf of the individual, or as otherwise permitted by law or applicable rules of procedure
Title 22, Chapter 7, Sec. 288e(b) - Deportation of undesirables
Should the Secretary of State determine that the continued presence in the United States of any person entitled to the benefits of this subchapter is not desirable, he shall so inform the foreign government or international organization concerned, as the case may be, and after such person shall have had a reasonable length of time, to be determined by the Secretary of State, to depart from the United States, he shall cease to be entitled to such benefits.
Based on what it says here and what I believe to know as true (just haven’t found it yet), the person with immunity can be arrested but once immunity is confirmed the charge must be dismissed. Through diplomatic channels a country seeking prosecution can request that immunity is waived so that the person can be held for trial. If that country says no, that’s it.