I don't think they can legally prosecute someone for going to another state to do something which is legal there, but that won't stop them from trying.
Prostitution is legal in some counties in Nevada. If somebody travels from another state to Nevada to visit a prostitute (in a county where it's legal), the state they live in can't prosecute them for that.