If a doctor performs abortions in a State, such as Maryland, that allows abortions, and visits a state where it is illegal, can that doctor be accused of an abortion-related crime while visiting the anti-abortion state?
A state may not punish actions committed in another state that are legal in that state.
If Maryland bans alcohol, Maryland may not punish a Marylander who drinks beer while visiting Virginia.
If the questioner is old enough, he may remember lots of people who went to Nevada to gamble, when gambling was illegal in most other states.