This question is related to Prosecuting a citizen for hiring a sex worker abroad where it is legal.
Let us suppose that prior to the following legal changes, Nation A and Nation B have extradition treaties with a list of mutually-agreed serious crimes including (but not necessarily limited to) assault, espionage, extortion, forgery, fraud, intimidation, kidnapping, murder, smuggling and theft, for which persons committing the listed crimes may be extradited.
Let us consider that Nation A then introduces laws that allow them to prosecute their citizens if they perform a specific act (such as hiring a sex worker) anywhere in the world.
Let us now suppose that Nation B then wants to introduce laws to protect the people who perform this act (such as hiring sex workers) which is legal in its territory. The goal is that if a person from Nation A comes to Nation B and performs this act (hires a legal sex worker) there, B wants to prevent anyone in A from prosecuting or persecuting its citizen.
B's intended law would operate as in the following example:
Adam, a citizen of Nation A, goes to Nation B and hires a sex worker in a transaction that is legal in Nation B. Bob observes Adam hiring a sex worker, and knowing that Adam is a citizen of Nation A and that people in A disapprove of hiring sex workers (whether by law or custom), reports Adam to people in A, resulting in Adam's legal prosecution or illegal persecution in Nation A. Nation B would seek extradition of Bob for espionage (or some other listed crime), since the act reported by Bob that led to Adam's prosecution or persecution was a legal act in B.
As far as Nation B is concerned, Bob need not have set foot in the territory of B if he has knowledge of Adam's actions in B that is used as grounds to prosecute or persecute Adam, and if Bob is in Nation A, B will request his extradition from A.
Would it be possible for Nation B to criminalise as espionage (or some other crime for which there is an extradition treaty with A) the act of reporting any legal action taken by any person within its territory to any person in another nation for purposes of causing either legal prosecution or illegal persecution of that person in that other jurisdiction for the action reported?