in the usa it's actually not a crime, because we have some stupid legal fiction that deportation is a civil matter (like a lawsuit) instead of a criminal matter. because criminal defendants get lots of legal protections that civil defendants don't, so people being deported don't have the right to a free lawyer or translator for instance. but on the other hand they can't be sent to prison while their hearing is ongoing either. also, even if you enter by sneaking over the border you can request asylum at any time, and they won't hold your border crossing against you.
United States