Where does the government derive authority to govern interactions where only half take place inside their borders?
Of course, if a crime is only half-committed in one country, then it is also only half-committed in the other country (presuming it is a crime in both). So either of the countries must be free to prosecute.