So if you are visitor, and have a valid visa, and commit a crime. You can be arrested and taken to jail in the US. It looks to me like you are subject to US jurisdiction.
There are many types of jurisdiction. Criminal acts cause arrest & prison whoever & wherever you are. That is a local jurisdiction action.
American citizens are routinely arrested, tried, convicted & imprisoned in other nations w/o becoming or being considered as citizens of that nation.
Indeed afterserving their sentance they are often deported to their country of citizenship.
What if you have no valid visa? That’s what is being discussed.
And the first thing they will do is contact their embassy. Can they be drafted? Can they be convicted of treason like a U.S. citizen can?